I want to center the following code:
\documentclass{article}
\usepackage[european]{circuitikz}
\usepackage{amsmath}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[h]
\begin{center}
\begin{circuitikz}
\draw
node[ocirc] (A) at(0,0) {}
node[ocirc] (B) at(0,-1) {}
node[currarrow, rotate = -90] at(0, -0.75) {};
\draw
(0, -0.75)
to[short, l=$U_1$] (0, -0.2);
\draw (0,-1.05)
node[rground]{};
\draw (0,0)
to[R=$R_2$, o-*](3,0)
to[R=$R_2$, -*](6,0)
to[R=$R_2$, -*](9,0)
to[R=$R_2$, -*](12,0)
to[R=$R_1$, -*](15,0)
to[short, i=$I_2$, -o](16,0);
\draw (3,0)
to[short](3,1.5)
to[R=$R_3$](6,1.5)
to[short](15,1.5)
to[short](15,0);
\draw (4.5,-2)
node[op amp,yscale=1.01] {};
\node at (1.5,-5) {$
\begin{aligned}
\text{Ausgangsstrom:} \quad
I_2 = \frac{U_1}{R_1} \quad \text{für}\; R_3=R_2-R_1
\end{aligned}
$};
\end{circuitikz}
\caption{Spannungsgesteuerte Stromquelle ohne Gleichtaktaussteuerung}
\end{center}
\end{figure}
\end{document}
Do not wonder why the circuit is not ready. Why does the \begin{center}
and \end{center}
command not work?
Best Answer
Well, Harish Kumar was faster than me ..., anyway, since as a matter of fact give answer in my comment, I just "publish" my redrawing of your circuits. I simplified it a bit, however in general it is similar to Harish Kumar answer: