Seite 1 von 1

circuitikz und Fehlermeldung bei Verwendung node[op amp]

Verfasst: Do 12. Feb 2015, 01:09
von dutss
Hallo zusammen,

habe mich seit ein paar Stunden mit circuitikz auseinandergesetzt. Alles klappt gut, solange ich keine OpAmps einfüge. Ansonsten erhalte ich eine Fehlermeldung: "Undefined control sequence \draw (7,0.5) node[op amp] (opamp1) {};"

Woran kann das liegen?

Danke für Vorschläge.

Grüße
\documentclass{minimal}
\usepackage{tikz}
\usepackage{circuitikz}

\begin{document}

\tikzset{component/.style={draw,thick,circle,fill=white,minimum size =0.5cm,inner sep=0pt}}

\begin{circuitikz}[european, scale =1.0]
\draw (0,1)node[left] {in} to[short,o-] (0.5,1)
     to[R={R},-*] (3,1) 
     to[R={R},-*] (3,3.5) to[short] (5.5,3.5) to[short] (8.5,3.5) to (8.5,0.5) ;% opamp1.out;
\draw [C, l={C$_2$}] (3,-1) to (3,1) ; 
\draw (3,-1)node[ground]{};
\draw (3,1) to [R={R},-*] (5.5,1) to [C, l={C$_1$},-*] (5.5,3.5) ;

\draw (7,0.5) node[op amp] (opamp1) {};

\draw (5.5,1) -- (opamp1.-);
\draw (5.5,-1)node[ground]{} to[short](5.5,0) --(opamp1.+);
%\draw (opamp1.out) to [short](8.5,0.5)


\end{circuitikz}

\end{document}


Verfasst: Do 12. Feb 2015, 11:43
von esdd
Dein Problem ist die gewählte Dokumentenklasse minimal, in der einfach viele Dinge nicht definiert sind und die sich deshalb nicht für Minimalbeispiele eignet.

Zum Beispiel liefert der folgende Code
\documentclass{minimal}
\begin{document}
\scriptsize Text
\end{document}
den Fehler: ! Undefined control sequence. \scriptsize

Wähle deshalb eine der KOMA-Script- oder der Standardklassen. Gerade bei einzelnen Zeichnungen bietet sich auch standalone an:

\documentclass[margin=10pt]{standalone} 
\usepackage{tikz} 
\usepackage{circuitikz} 

\begin{document} 
\tikzset{component/.style={draw,thick,circle,fill=white,minimum size =0.5cm,inner sep=0pt}} 

\begin{circuitikz}[european, scale =1.0] 
\draw (0,1)node[left] {in} to[short,o-] (0.5,1) 
      to[R={R},-*] (3,1) 
      to[R={R},-*] (3,3.5) to[short] (5.5,3.5) to[short] (8.5,3.5) to (8.5,0.5) ;% opamp1.out; 
\draw [C, l={C$_2$}] (3,-1) to (3,1) ; 
\draw (3,-1)node[ground]{}; 
\draw (3,1) to [R={R},-*] (5.5,1) to [C, l={C$_1$},-*] (5.5,3.5) ; 
\draw (7,0.5) node[op amp] (opamp1) {}; 
\draw (5.5,1) -- (opamp1.-); 
\draw (5.5,-1)node[ground]{} to[short](5.5,0) --(opamp1.+); 
\draw (opamp1.out) to [short](8.5,0.5);
\end{circuitikz} 
\end{document}
Gruß
Elke

Bild

Verfasst: Do 12. Feb 2015, 15:24
von dutss
Hey Elke,

vielen Dank für die Lösung. Ich habe ewig im Code nach Syntaxfehlern gesucht :/

Schönen Tag noch!

dutss