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 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:

circuit

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...

share|improve this question
    
Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Papiro Apr 29 '13 at 10:21
add comment

1 Answer 1

up vote 3 down vote accepted

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:

enter image description here

For problem 3, unfortunately I can not point a better resource.

share|improve this answer
    
Just in time. This was a perfect answer. Thank you! –  algebralives Apr 29 '13 at 13:06
    
@algebralives: you're welcome :) –  Claudio Fiandrino Apr 29 '13 at 13:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.