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 currently have the following:

Circuit

Now the problem is with the voltage indicator Vc. I don't want to it to be an arrow but a + Vc - kind of notation. This is easily done by using the option american voltages in circuitikz. But I don't want to have the voltage sources to be indicated with circle +/- symbol inside. Thus how can I achieve + Vc - kind of notation without using the american voltages option?

The code

\documentclass{standalone}
\usepackage{graphics}
\usepackage{siunitx}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[%
  europeanvoltages,
  europeancurrents,
  europeanresistors,
  americaninductors,
  smartlabels]{circuitikz}

\usetikzlibrary{calc}
\ctikzset{bipoles/thickness=1}
\ctikzset{bipoles/length=0.8cm}
\tikzstyle{every node}=[font=\small]
\tikzstyle{every path}=[line width=0.8pt,line cap=round,line join=round]

\begin{document}
\begin{circuitikz}[every info/.style={font=\footnotesize}]
  \ctikzset{current/distance=2}
  \draw (0,0)
      to[V,l=$V_s$] ++ (0,2.5)
      to[short] ++ (1.0,0) node[right] {\tiny 1}
      to[open,o-o,l=$q_1$] ++ (0.65,0)
      to[short] ++ (0.5,0)
      to[L,l_=$L$,i=$i_L$] ++ (1,0)
      to[short] ++ (0.5,0)
      to[R,l_=$R_L$] ++ (1,0)
      to[short] ++ (0.5,0)
      to[open,o-o,l=$q_2$] ++ (0.65,0) node[left] {\tiny 1}
      to[short] ++ (2.0,0)
      to[I,l=$I_\mathrm{load}$] ++ (0,-2.5)
      to[short,-*] ++ (-1.2,0) coordinate (B)
      to[short,-*] ++ (-0.9,0) coordinate (C)
      to[short,-*] ++ (-4.6,0) coordinate (D)
      to[short] ++ (-1.1,0)
    (B)
      to[C,l=$C$,v=\quad$V_C$,-*] ++ (0,2.5)
    (C)
      to[short,-o] ++ (0,2.1) node[right] {\tiny 0}
      to[short] ++ (-0.55,0.4)
    (D)
      to[short,-o] ++ (0,2.1) node[left] {\tiny 0}
      to[short] ++ (0.55,0.4)
  ;
\end{circuitikz}
\end{document}
share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Add

\ctikzset{v/.append style={/tikz/american voltages}}

to your preamble and you get

enter image description here

share|improve this answer
    
Thank you for your answer, also clever approach. Only need to remove the \quad now :-) –  WG- Mar 2 '13 at 1:20
add comment

One way to solve the problem is to separate the circuit into two \draw-macros. You could possible also do it by redefining the voltage source to american-style globally. Here is my suggestion:

\documentclass{standalone}
\usepackage{graphics}
\usepackage{siunitx}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[%
  europeanvoltages,
  europeancurrents,
  europeanresistors,
  americaninductors,
  smartlabels]{circuitikz}
\pgfplotsset{compat=1.7}
\usetikzlibrary{calc}
\ctikzset{bipoles/thickness=1}
\ctikzset{bipoles/length=0.8cm}
\tikzstyle{every node}=[font=\small]
\tikzstyle{every path}=[line width=0.8pt,line cap=round,line join=round]

\begin{document}
\begin{circuitikz}[every info/.style={font=\footnotesize}]
  \ctikzset{current/distance=2}
  \draw (0,0)
      to[V,l=$V_s$] ++ (0,2.5)
      to[short] ++ (1.0,0) node[right] {\tiny 1}
      to[open,o-o,l=$q_1$] ++ (0.65,0)
      to[short] ++ (0.5,0)
      to[L,l_=$L$,i=$i_L$] ++ (1,0)
      to[short] ++ (0.5,0)
      to[R,l_=$R_L$] ++ (1,0)
      to[short] ++ (0.5,0)
      to[open,o-o,l=$q_2$] ++ (0.65,0) node[left] {\tiny 1}
      to[short] ++ (2.0,0)
      to[I,l=$I_\mathrm{load}$] ++ (0,-2.5)
      to[short,-*] ++ (-1.2,0) coordinate (B)
      to[short,-*] ++ (-0.9,0) coordinate (C)
      to[short,-*] ++ (-4.6,0) coordinate (D)
      to[short] ++ (-1.1,0) (B);
   \draw[american] (B)       
      to[C,l=$C$,v=\quad$V_C$,-*] ++ (0,2.5)
    (C)
      to[short,-o] ++ (0,2.1) node[right] {\tiny 0}
      to[short] ++ (-0.55,0.4)
    (D)
      to[short,-o] ++ (0,2.1) node[left] {\tiny 0}
      to[short] ++ (0.55,0.4);
\end{circuitikz}
\end{document}
share|improve this answer
    
Thank you for your answer. Clever approach! I marked the other answer as the correct one since his approach is more flexible to me, since I want the notation to be american for all v's. –  WG- Mar 2 '13 at 1:19
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.