There is an easy way. Use an existing component as a base, such as
to[generic,color=white,n=myname]
and draw anything you want in the space.
\newcommand{\speaker}[2] % #1 = name from to[generic,n=#1], #2 = rotation angle
{\draw[thick,rotate=#2] (#1) +(.2,.25) -- +(.7,.75) -- +(.7,-.75) -- +(.2,-.25);}
\begin{circuitikz}
\draw (0,2) to[C, l_=$C$, o-*] (2,2) to[short, -*] (3.5,2) to[short] (5,2);
\draw (0,0) to[short, o-*] (2,0) to[short, -*] (3.5,0) to[short] (5,0);
\draw (2,2) to[L=$L$] (2,0);
\draw (3.5,2) to[R=$R$] (3.5,0);
\draw (5,2) to[generic, n=S1](5,0);
\speaker{S1}{0}
\end{circuitikz}
I have improved on my technique since then, as explained in the following tutorials.
http://www.elfsoft2000.com/projects/speaker.pdf
http://www.elfsoft2000.com/projects/multipole.pdf
http://www.elfsoft2000.com/projects/bipole.pdf
Problem 1: Positioning Labels
This can be solved quite easily since circuitikz
defines also l^
and l_
to locate the labels. In this case l_
is the option needed.
Problem 2: Scaling components
The options scale
and transform shape
are always a way since circuitikz
exploits TikZ, but there are also specific keys to change size of the components; you find some examples in the documentation 6.2 Components size.
To get thicker lines, one can always use the standard TikZ keys thick
, very thick
and so on or line width
.
Here is an example which more or less answers to all the request (just illustrative: the combination of thick
with that bipoles' length is awful):
\documentclass{article}
\usepackage{circuitikz}
\usepackage{siunitx}
\begin{document}
\begin{circuitikz}[scale=0.8, transform shape,thick]
\ctikzset{bipoles/length=0.85cm}
\draw (5,0) --
(5,-2) to[battery, l=$1.5\ V$, i=$\SI{3}{A}$]
(0,-2) --
(0,0) to[resistor, l= $R_2$ ] (5,0);
\draw
(3.5,1.5) to[resistor, l_=$R_3$]
(1.5,1.5)--
(1.5,-1.1) to[resistor, l= $R_1$ ]
(3.5,-1.1) -- (3.5,1.5);
\end{circuitikz}
\end{document}
The result:
For problem 3, unfortunately I can not point a better resource.
Best Answer
If you add the option
[blue]
to yourdraw
command, everything should be fine. If you want to revert to the default color, you end the blue draw command with a semicolon and begin a newdraw
command without the blue color options.