summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-06 15:02:23 +0000
committerKarl Berry <karl@freefriends.org>2009-05-06 15:02:23 +0000
commitb4afea7b1b3b0414f91a2c2632b1788c2cc6634f (patch)
tree8f07981501ef90325a7f2f9e8d1a01dbf2d9f035 /Master/texmf-dist/tex
parent6534ce0ba0f2e405c4bbe618499e235d5830f5a2 (diff)
circuitikz 0.2.1 (3may09)
git-svn-id: svn://tug.org/texlive/trunk@12947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty22
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty172
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/pgfcircutils.sty2
3 files changed, 193 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index e3feb982875..1ff69513393 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -10,7 +10,7 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.2}
+\def\pgfcircversion{0.2.1}
\ProvidesPackage{circuitikz}%
[2009/04/17 The CircuiTikz circuit drawing package version \pgfcircversion]
@@ -68,6 +68,15 @@
\pgf@circ@siunitxfalse
}
+\DeclareOption{arrowmos}{
+ \pgf@circuit@mos@arrowstrue
+}
+
+\DeclareOption{noarrowmos}{
+ \pgf@circuit@mos@arrowsfalse
+}
+
+
%% Keys
\newcommand{\pgf@circ@comment}[1]{}
@@ -145,6 +154,10 @@
\ctikzset{bipoles/not port/height/.initial=.8}
\ctikzset{bipoles/not port/circle width/.initial=.15}
+\newif\ifpgf@circuit@mos@arrows
+\ctikzset{tripoles/mos style/.is choice}
+\ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
+\ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
\ctikzset{tripoles/nmos/width/.initial=.7}
\ctikzset{tripoles/nmos/gate height/.initial=.35}
\ctikzset{tripoles/nmos/base height/.initial=.5}
@@ -221,6 +234,11 @@
\ctikzset{tripoles/xnor port/ccc/.initial=.5}
\ctikzset{tripoles/xnor port/ddd/.initial=.0}
\ctikzset{tripoles/xnor port/circle width/.initial=.15}
+\ctikzset{tripoles/op amp/width/.initial=1.7}
+\ctikzset{tripoles/op amp/port width/.initial=.7}
+\ctikzset{tripoles/op amp/height/.initial=1.4}
+\ctikzset{tripoles/op amp/input height/.initial=.5}
+\ctikzset{tripoles/op amp/up pos/.initial=.45}
\ctikzset{quadpoles/transformer/width/.initial=1.5}
\ctikzset{quadpoles/transformer/height/.initial=1.5}
@@ -339,7 +357,7 @@
-\ExecuteOptions{european, nosiunitx}
+\ExecuteOptions{european, nosiunitx, noarrowmos}
\ProcessOptions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty
index 641dd0c40e6..cc32b915ad1 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcirctripoles.sty
@@ -524,6 +524,24 @@
\pgfsetlinewidth{2\pgflinewidth}
\pgfusepath{draw}
\endpgfscope
+
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgftransformlineattime{.6}{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
+ }{%
+ \pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ \fi
+
\pgfmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
@@ -557,6 +575,23 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
\pgfusepath{draw}
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgftransformlineattime{.4}{%
+ \pgfpoint%
+ {\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
+ }{%
+ \pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ \fi
+
\pgfscope
\pgfmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
@@ -746,4 +781,141 @@
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\pgfdeclareshape{op amp}
+ {
+ \anchor{center}{\pgfpointorigin}
+ \savedanchor\northwest{%
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \savedanchor\left{%
+ \pgf@y=0pt
+ }
+ \savedanchor\inOne{%
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{-}{
+ \inOne
+ }
+ \anchor{+}{
+ \inOne
+ \pgf@y=-\pgf@y
+ }
+ \savedanchor\up{%
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+ \pgfpointlineattime{
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/up pos}}{
+ \pgfpoint{
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
+ {\pgf@circ@res@up}}
+ {\pgfpoint{.7\pgf@circ@res@right}{0pt}}
+ }
+ \anchor{up}{
+ \up
+ }
+ \anchor{down}{
+ \up
+ \pgf@y=-\pgf@y
+ }
+ \anchor{out}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+
+ \northwest
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
+ \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}]{\ $-$}
+
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}}
+ \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@down}]{\ $+$}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
+
+ \pgfusepath{draw}
+
+
+ \pgfscope
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgftransformxshift{.7\pgf@circ@res@left}
+ \pgf@circ@res@step=\pgf@circ@res@right
+ \advance\pgf@circ@res@step by -\pgf@circ@res@left
+ \pgf@circ@res@step=.7\pgf@circ@res@step
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+
+
+ }
+ }
+
+
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircutils.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircutils.sty
index 7fa55c85998..49c3cef228a 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircutils.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircutils.sty
@@ -9,7 +9,7 @@
\def\pgf@circ@handleSI#1{
- \noexpandarg
+% \noexpandarg
\def\pgf@temp{}
\StrBetween{#1}{<}{>}[\pgf@circ@handleSI@unit]
\StrLen{\pgf@circ@handleSI@unit}[\pgf@circ@handleSI@unit@len]