Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm making my first steps with circuitikz. But I'm a bit disappointed, because despite having texlive-full, some elements from the library aren't recognized while compiling, like thyristor, transformer or every types of igbt.

Here is the code I did (with some inspiration from Texample.net) :

\documentclass{article}
\usepackage{amsmath}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage[french]{babel}
\usepackage{mathptmx}
%\usepackage{tikz}
%\usetikzlibrary{circuits.ee}
\usepackage[americaninductor,european]{circuitikz}
\usepackage{siunitx}
\usepackage{mathpazo}
\usepackage{color}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment[]{tikzpicture}
\PreviewEnvironment[]{pgfpicture}
\DeclareSymbolFont{symbolsb}{OMS}{cmsy}{m}{n}
\SetSymbolFont{symbolsb}{bold}{OMS}{cmsy}{b}{n}
\DeclareSymbolFontAlphabet{\mathcal}{symbolsb}

\usetikzlibrary{calc}
\ctikzset{bipoles/thickness=1}
\ctikzset{bipoles/length=0.8cm}
\ctikzset{bipoles/diode/height=.375}
\ctikzset{bipoles/diode/width=.3}
%\ctikzset{tripoles/thyristor/height=.8}
%\ctikzset{tripoles/thyristor/width=1}
\ctikzset{bipoles/vsourceam/height/.initial=.7}
\ctikzset{bipoles/vsourceam/width/.initial=.7}
\tikzstyle{every node}=[font=\small]
\tikzstyle{every path}=[line width=0.8pt,line cap=round,line join=round]

\begin{document}

\begin{circuitikz}
\draw
(0,0) to[battery,l=$V_{\text{pile}}$] ++(0,4)
++(0,0) to[L,l=$L_e$] ++(2,0) coordinate (LT)
++(0,0) to[C,l=$C_e$] ++(0,-4) -- (0,0)
%  H-bridge 1st leg
(LT) ++(2,-1) node [npn,scale=1,name=igbt1] {}
++(0,-2) node [npn,scale=1,name=igbt3] {}
(igbt3.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt3.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt1.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt1.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt1.C) |- (LT)
(igbt1.E) -- (igbt3.C)
(igbt3.E) |- (0,0)
% H-bridge 2nd leg
(LT) ++(4,-1) node [npn,scale=1,name=igbt2] {}
++(0,-2) node [npn,scale=1,name=igbt4] {}
(igbt4.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt4.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt2.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt2.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt2.C) |- (LT)
(igbt2.E) -- (igbt4.C)
(igbt4.E) |- (0,0)
% Transfo
(igbt1.E) node[circ] {} -| ++(4,0) to[R,l=$R_{ch}$] ++(0,-1) |-      (igbt4.C) node[circ] {}
% PWM
(2,-0.5) rectangle (6,-1.5)
(3,-0.5) |- (igbt1.B)
(3.2,-0.5) |- (igbt3.B)
(5,-0.5) |- (igbt2.B)
(5.2,-0.5) |- (igbt4.B)
;
\node (note1) at (4,-1) {Phase-shifted PWM};
\node (note1) at (3.5,3.5) {$T_1$};
\node (note1) at (4.7,3) {$D_1$};
\node (note1) at (3.5,1.5) {$T_3$};
\node (note1) at (4.7,1) {$D_3$};
\node (note1) at (5.5,3.5) {$T_2$};
\node (note1) at (6.7,3) {$D_2$};
\node (note1) at (5.5,1.5) {$T_4$};
\node (note1) at (6.7,1) {$D_4$};
\end{circuitikz}

\end{document}

I would like to know if I'm doing anything wrong.

I think it's needless to say that it compiles with npn, but when I put nigbt instead of npn it fails to find the element tikz/nigbt.

Running on Ubuntu 12.04.

share|improve this question
4  
You're probably using TeXLive 2009, which is really outdated. There's no way to use the Debian/Ubuntu package manager to get up to date versions of packages, so you should install a current TeXLive manually. –  Jake May 17 '12 at 15:56
    
following Jake's comment, see how-to-install-vanilla-texlive-on-debian-or-ubuntu –  cmhughes May 17 '12 at 18:18
    
Yep, that was it. On archlinux it is working... –  s__C May 18 '12 at 7:59
add comment

closed as too localized by Joseph Wright Aug 6 '12 at 20:54

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.