From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 .../pgf/contrib/circuitikz/tex/t-circuitikz.tex    | 139 +++++++++++++++++++++
 1 file changed, 139 insertions(+)
 create mode 100644 graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex

(limited to 'graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex')

diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
new file mode 100644
index 0000000000..a5117dfe78
--- /dev/null
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -0,0 +1,139 @@
+\def\pgfcircversion{0.9.4}
+\def\pgfcircversiondate{2019/08/30}
+\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
+
+\usemodule[tikz]
+
+\startmodule[circuitikz]
+\usetikzlibrary[calc]
+\usetikzlibrary[arrows.meta, bending]
+
+\unprotect
+
+\edef\tikzatcode{\the\catcode`\@}
+\edef\tikzbarcode{\the\catcode`\|}
+\edef\tikzexclaimcode{\the\catcode`\!}
+\catcode`\@=11
+\catcode`\|=12
+\catcode`\!=12
+
+\let\tiny=\tfxx
+\let\small=\tfx
+
+\input pgfcirc.defines.tex
+\input pgfcircutils.tex
+
+\input pgfcircshapes.tex
+\input pgfcircmonopoles.tex
+\input pgfcircbipoles.tex
+\input pgfcirctripoles.tex
+\input pgfcircquadpoles.tex
+\input pgfcircmultipoles.tex
+
+\input pgfcirclabel.tex
+\input pgfcircvoltage.tex
+\input pgfcirccurrent.tex
+\input pgfcircflow.tex
+
+% defaults
+
+\setupmodule
+   [current=european,
+    voltage=european,
+    resistor=american,
+    inductor=cute,
+    logic=american,
+    siunitx=true,
+    arrowmos=false]
+
+\processaction
+   [\currentmoduleparameter{voltage}]
+   [european=>\ctikzset{voltage=european},
+    american=>\ctikzset{voltage=american}]
+
+\processaction
+   [\currentmoduleparameter{current}]
+   [european=>\ctikzset{ current=european},
+    american=>\ctikzset{ current=american}]
+
+\processaction
+   [\currentmoduleparameter{label}]
+   [straight=>\ctikzset{label/align = straight},
+    align=>\ctikzset{label/align = rotate},
+    smart=>\ctikzset{label/align = smart}]
+
+\processaction
+   [\currentmoduleparameter{resistor}]
+   [european=>\ctikzset{ resistor=european},
+    american=>\ctikzset{ resistor=american}]
+
+\processaction
+   [\currentmoduleparameter{inductor}]
+   [european=>\ctikzset{ inductor=european},
+    american=>\ctikzset{ inductor=american},
+    cute=>\ctikzset{ inductor=cute}]
+
+\processaction
+   [\currentmoduleparameter{diode}]
+   [full=>\ctikzset{ diode=full},
+    empty=>\ctikzset{ diode=empty}]
+
+\processaction
+   [\currentmoduleparameter{logic}]
+   [european=>\ctikzset{ logic ports=european},
+    american=>\ctikzset{ logic ports=american}]
+
+\processaction
+   [\currentmoduleparameter{siunitx}]
+   [true=>\def\SI#1#2{#1\,#2}
+    \def\ampere{\rm{A}}
+    \def\volt{\rm{V}}
+    \def\ohm{\Omega}
+    \def\siemens{\rm{S}}
+    \def\farad{\rm{F}}
+    \def\henry{\rm{H}}
+    \def\second{\rm{s}}
+    \def\coulomb{\rm{C}}
+    \def\siemens{\rm{S}}
+    \def\radians{\rm{rad}}
+    \def\milli{\rm{m}}
+    \def\micro{\mu}
+    \def\nano{\rm{n}}
+    \def\pico{\rm{p}}
+    \def\kilo{\rm{k}}
+    \def\mega{\rm{M}}
+    \def\giga{\rm{G}}
+    \def\tera{\rm{T}},
+    false=>]
+%   \s!default=>\pgf@circ@siunitxtrue,
+
+\processaction
+   [\currentmoduleparameter{arrowmos}]
+   [true=>\pgf@circuit@mos@arrowstrue,
+    false=>\pgf@circuit@mos@arrowsfalse]
+%   \s!default=>\pgf@circuit@mos@arrowstrue,
+
+
+\ifpgf@circ@siunitx
+ % nothing! siunitx and xstrings don't work in context
+\fi
+
+
+% Context specific
+
+\ctikzset{tripoles/op amp/font/.initial=\switchtobodyfont[small]}
+
+\input pgfcircpath.tex
+
+\catcode`\@=\tikzatcode
+\catcode`\|=\tikzbarcode
+\catcode`\!=\tikzexclaimcode
+
+% define the environment
+\long\def\startcircuitikz#1\stopcircuitikz{\starttikzpicture#1\stoptikzpicture}
+
+\protect
+
+\stopmodule
+
+\endinput
-- 
cgit v1.2.3

