summaryrefslogtreecommitdiff
path: root/Master
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
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')
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/CHANGELOG3
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/README2
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin259777 -> 262410 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex56
-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
7 files changed, 250 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/circuitikz/CHANGELOG b/Master/texmf-dist/doc/latex/circuitikz/CHANGELOG
index fd3ead44653..619f95681d8 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/CHANGELOG
+++ b/Master/texmf-dist/doc/latex/circuitikz/CHANGELOG
@@ -1,5 +1,8 @@
CircuiTikz - Changelog
+* Version 0.2.1 - 20090503
+ - Op-amps added
+ - added options arrowmos and noarrowmos, to add arrows to pmos and nmos
* Version 0.2 - 20090417
First public release on CTAN
- *Backward incompatibility*: labels ending with \texttt{:}\textit{angle} are not parsed for positioning anymore.
diff --git a/Master/texmf-dist/doc/latex/circuitikz/README b/Master/texmf-dist/doc/latex/circuitikz/README
index 78ee622c266..a03af7bda4a 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/README
+++ b/Master/texmf-dist/doc/latex/circuitikz/README
@@ -1,4 +1,4 @@
-This is CircuiTikz, version 0.2.
+This is CircuiTikz, version 0.2.1.
This package provides a set of macros for naturally typesetting electrical and (somewhat less naturally, perhaps) electronical networks.
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index a5c6bd193ea..0b687addc0b 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
index 3a81f19564f..8ae502a7706 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -1,4 +1,4 @@
-\documentclass{article}
+\documentclass[a4paper]{article}
\usepackage[siunitx]{circuitikz}
\usepackage{showexpl}
@@ -6,7 +6,7 @@
\usepackage{hyperref}
\hypersetup{
bookmarks=false, % show bookmarks bar?
- pdftitle={CircuitTikZ v. 2.0 - manual}, % title
+ pdftitle={CircuitTikZ v. 0.2.1 - manual}, % title
pdfauthor={Massimo Redaelli}, % author
pdfsubject={CircuitTikZ manual}, % subject of the document
pdfkeywords={}, % list of keywords
@@ -32,7 +32,7 @@
\lstset{frameround=fttt}
\lstloadlanguages{TeX}
-\title{Circui\TikZ \\{\large version 0.2}}
+\title{Circui\TikZ \\{\large version 0.2.1}}
\author{Massimo A. Redaelli}
\date{\today}
@@ -97,8 +97,13 @@ None, as far as I know.
\item \texttt{nosiunitx}: labels are not interpreted as above;
\item \texttt{fulldiode}: the various diodes are drawn \emph{and} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Un-filled diode can always be forced with \texttt{Do}, \texttt{sDo}, \ldots
\item \texttt{emptydiode}: the various diodes are drawn \emph{but not} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Filled diode can always be forced with \texttt{D*}, \texttt{sD*}, \ldots
+ \item \texttt{arrowmos}: pmos and nmos have arrows analogous to those of pnp and npn transistors;
+ \item \texttt{noarrowmos}: pmos and nmos do not have arrows analogous to those of pnp and npn transistors.
\end{itemize}
+Loading the package with no options is equivalent to:\\
+ \verb!\usepackage[european, nosiunitx, noarrowmos]{circuitikz}!.
+
\section{The components}
Here follows the list of all the shapes defined by Circui\TikZ. These are all \texttt{pgf} nodes, so they are usable in both \texttt{pgf} and \TikZ.
@@ -238,6 +243,14 @@ One can also use the related styles \texttt{[european current]} [resp. \texttt{[
\circuititem{pnp}{pnp}{}
\end{itemize}
+If the option \texttt{arrowmos} is used (or after the commant \verb!\ctikzset{tripoles/mos style/arrows}! is given), this is the output:
+\ctikzset{tripoles/mos style/arrows}
+\begin{itemize}
+ \circuititem{nmos}{nmos}{}
+ \circuititem{pmos}{pmos}{}
+\end{itemize}
+\ctikzset{tripoles/mos style/no arrows}
+
\subsection{Double bipoles}
\begin{itemize}
@@ -260,6 +273,11 @@ One can also use the related styles \texttt{[european current]} [resp. \texttt{[
\end{itemize}
+\subsection{Operational Amplifier}
+\begin{itemize}
+ \circuititem{op amp}{Operational amplifier}{}
+\end{itemize}
+
\subsection{Support shapes}
\begin{itemize}
@@ -815,6 +833,31 @@ Here is one composite example:
;\end{circuitikz}
\end{LTXexample}
+\paragraph{Operational amplifier} The op amp defines the inverting input (\texttt{-}), the non-inverting input (\texttt{+}) and the output (\texttt{out}) anchors:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+ (0,0) node[op amp] (opamp) {}
+ (opamp.+) node[left] {$v_+$}
+ (opamp.-) node[left] {$v_-$}
+ (opamp.out) node[right] {$v_o$}
+;\end{circuitikz}
+\end{LTXexample}
+
+There are also two more anchors defined, \texttt{up} and \texttt{down}, for the power supplies:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+ (0,0) node[op amp] (opamp) {}
+ (opamp.+) node[left] {$v_+$}
+ (opamp.-) node[left] {$v_-$}
+ (opamp.out) node[right] {$v_o$}
+ (opamp.down) node[ground] {}
+ (opamp.up) ++ (0,.5) node[above] {\SI{12}{\volt}}
+ -- (opamp.up)
+;\end{circuitikz}
+\end{LTXexample}
+
+
\paragraph{Double bipoles} All the (few, actually) double bipoles/quadrupoles have
the four anchors, two for each port. The first port, to the left, is port \texttt{A}, having the anchors \texttt{A1} (up) and \texttt{A2} (down); same for port \texttt{B}. They also expose the \texttt{base} anchor, for labelling:
@@ -1058,6 +1101,13 @@ And yes: this is a bug and \emph{not} a feature\ldots
\section{Revision history}
\begin{itemize}
+\item[\itshape version 0.2.1] (20090503).
+ \begin{enumerate}
+ \item Op-amps added.
+ \item Added options \texttt{arrowmos} and \texttt{noarrowmos}.
+ \end{enumerate}
+
+
\item[\itshape version 0.2] First public release on CTAN (20090417).
\begin{enumerate}
\item \textbf{Backward incompatibility}: labels ending with \texttt{:}\textit{angle} are not parsed for positioning anymore.
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]