Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{tikz}
  3. usepackage[american,siunitx]{circuitikz}
  4. usepackage{latexsym,amssymb,amsmath}
  5. usepackage[active,tightpage]{preview}
  6. PreviewEnvironment{tikzpicture}
  7. setlengthPreviewBorder{50pt}%
  8.  
  9. begin{document}
  10.  
  11.  
  12. begin{tikzpicture} [auto, circuitikz]
  13.  
  14. %produces error. Without i=$I$, it works
  15. draw (0,0) to [R=$R_1$, v_=$v_1$, i=$I$, *-*] (2,0)
  16. -| (3,-1)
  17. to [R=$R_2$, v_=$v_2$, *-*] (3,-3)
  18. |- (-1,-4)
  19. to [battery, l = $V$, *-*] (-1,0)
  20. -- (0,0)
  21. (1,-2) node[scale=6]{$circlearrowright$}
  22. (1,-2) node{$I$};
  23.  
  24. end{tikzpicture}
  25.  
  26. end{document}
  27.  
  28. documentclass{article}
  29. usepackage{tikz}
  30. usepackage[american,siunitx]{circuitikz}
  31. usepackage{latexsym,amssymb,amsmath}
  32. usepackage[active,tightpage]{preview}
  33. PreviewEnvironment{tikzpicture}
  34. setlengthPreviewBorder{50pt}%
  35.  
  36. begin{document}
  37.  
  38.  
  39. begin{circuitikz}
  40. %produces error. Without i=$I$, it works
  41. draw (0,0) to [R=$R_1$,v_=raisebox{-10pt}{$v_1$}, i=$I$, *-*] (2,0)
  42. -| (3,-1)
  43. to [R=$R_2$, v_={$v_2$,,}, *-*] (3,-3)
  44. |- (-1,-4)
  45. to [battery, v_ = $V$, *-*] (-1,0)
  46. -- (0,0)
  47. (1,-2) node[scale=6]{$circlearrowright$}
  48. (1,-2) node{$I$};
  49. end{circuitikz}
  50.  
  51. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement