I'm trying to pick up circuitikz
tonight to draw a few circuits. I ran into a few problems.
Problem 1: Positioning Labels
Here's my problem. When I use this code:
\documentclass{article}
\usepackage{circuitikz}
\usepackage{siunitx}
\begin{document}
\begin{circuitikz}
\draw[scale=0.8, transform shape]
(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[scale=0.8, transform shape]
(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}
I get this:
I can't figure out how to get the R_3 label above the resistor.
Problem 2: Scaling components
I've been using the scale
and transform shape
options, but is there a better way to change the size of each component and label?
Related, is there a way to get thicker lines?
Problem 3: Documentation
I've only been able to find this document for documentation, and I don't think it's very comprehensive. Is there a better resource?
If not, can you please explain a better way of drawing my circuit than the way I've done it. Mine feels really amateurish…
Best Answer
Problem 1: Positioning Labels
This can be solved quite easily since
circuitikz
defines alsol^
andl_
to locate the labels. In this casel_
is the option needed.Problem 2: Scaling components
The options
scale
andtransform shape
are always a way sincecircuitikz
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 orline 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):The result:
For problem 3, unfortunately I can not point a better resource.