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.

Since upgrading to circuitikz 2.4, I noticed that the voltage labels are way too close to the circuit elements.

For example:

\documentclass{article}
\usepackage[american voltages,siunitx]{circuitikz}

\begin{document}
\begin{circuitikz}
   \draw (0,0) to [R=\SI{10}{\ohm},v=$v_r(t)$] (0,3)
               to [C=\SI{10}{F},v=$v_c(t)$] (0,6);
\end{circuitikz}
\end{document}

This is what my output looks like with circuitikz 2.4:

labels too close

Anyone else experience this? Is there an easy fix?

share|improve this question
    
I am not really familiar with the circuitikz package, so I will leave this just as a comment (in case there's a "proper" way of solving the issue). You can add some horizontal space: \documentclass{article} \usepackage[american voltages,siunitx]{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) to [R=\SI{10}{\ohm},v=\hspace{25pt}$v_r(t)$] (0,3) to [C=\SI{10}{F},v=\hspace{25pt}$v_c(t)$] (0,6); \end{circuitikz} \end{document} –  Gonzalo Medina Mar 13 '12 at 1:55
    
@GonzaloMedina your solution looks better. You should add it as an answer. –  Harish Kumar Mar 13 '12 at 8:33
    

1 Answer 1

I am not really familiar with the circuitikz package, so maybe there's a more "proper" way of solving the issue. However, you can manually add some horizontal space:

\documentclass{article} 
\usepackage[american voltages,siunitx]{circuitikz} 

\begin{document} 

\begin{circuitikz} 
  \draw (0,0) to [R=\SI{10}{\ohm},v=\hspace{25pt}$v_r(t)$] (0,3) 
    to [C=\SI{10}{F},v=\hspace{25pt}$v_c(t)$] (0,6); 
\end{circuitikz} 

\end{document}

enter image description here

share|improve this answer
    
Thank you Gonzalo, that doe work, but it is not ideal. For previous versions of the package, the spacing would be adjusted properly, and the +/- would not be so close to the wire. I think it's a bug, but am not sure... I'll see if I can figure out where to report this. –  quickk Mar 14 '12 at 18:10

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.