# Error when trying to typeset resistances in circuitkz

I get an error called \ProcessOptions\relax. I don't have any idea what could it be. I guess that maybe spanish babel gives problems.

\documentclass[letterpaper,11pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath,amsfonts,amsthm,amssymb}
\usepackage{epsfig,graphicx}
\usepackage{mathrsfs}
\spanishdecimal{.}
\usepackage{wrapfig}
\usepackage{tikz}
\usepackage[symbols]{circuitikz}

\begin{document}
\begin{figure}[h]
\centering
\begin{circuitikz} \draw
(0,0) node[anchor=east]{B}
to[short, o-*] (1,0)
to[R, l=$20\ohm$, *-*] (1,2)
to [R, v=$v_x$, l=$10\ohm$] (3,2)
to[short] (4,2) to[cI, i=, *-*] (4,0)
to[short] (3,0) to[R, l=$5\ohm$, *-*] (3,2)
(3,0) -- (1,0)
(1,2) to[short, *-o] (0,2)
node[anchor=east]{A}
;\end{circuitikz}
\caption{Circuito}
\end{figure}
\end{document}


-
Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Jubobs Apr 19 '14 at 22:33
symbols doesn't appear to be an option for circuitikz – cmhughes Apr 19 '14 at 22:40
I'm sure it is not the right way but \let\ohm\Omega in the preamble gets it to compile. (And produces more-or-less sensible-looking output.) – cfr Apr 19 '14 at 23:08
I am a bit baffled. The error using the intended syntax, that is (0,0) to[R=20<\ohm>] (2,0) appears using babel specifically with the spanish option. I'll look into it as soon as I have time. Meanwhile, I'd advise to use the full syntax to[R=\SI{20}{\ohm}]. – kenshin Apr 22 '14 at 8:32

Error messages in (La)TeX can be cryptic, and even misleading, but this one is pretty explicit:

Unknown option symbols' for package circuitikz'


A quick look at the circuitikz manual (section 2: Options) will give you confirmation that the circtuitkz package indeed does not provide any option called symbols; at least, the latest version (0.3.0) does not.

To fix the problem with your labels, you need to load circuitikz with option siunitx:

siunitx: integrates with siunitx package. If labels, currents or voltages are of the form #1<#2> then what is shown is actually \SI{#1}{#2}.

Those directions are a bit unclear, but what they mean is that you need to use siunitx's \SI macro to typeset resistance labels (values and units). Here is an example:

\SI{20}{\ohm}


## Complete code

\documentclass[letterpaper,11pt]{article}

\usepackage[latin1]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath,amsfonts,amsthm,amssymb}
\usepackage{epsfig,graphicx}
\usepackage{mathrsfs}
\spanishdecimal{.}
\usepackage{wrapfig}
\usepackage{tikz}
\usepackage[siunitx]{circuitikz}

\begin{document}

\begin{figure}[h]
\centering
\begin{circuitikz} \draw
(0,0) node[anchor=east]{B}
to[short, o-*] (1,0)
to[R, l=\SI{20}{\ohm}, *-*] (1,2)
to [R, v=$v_x$, l=\SI{10}{\ohm}] (3,2)
to[short] (4,2) to[cI, i=, *-*] (4,0)
to[short] (3,0) to[R, l=\SI{5}{\ohm}, *-*] (3,2)
(3,0) -- (1,0)
(1,2) to[short, *-o] (0,2)
node[anchor=east]{A};
\end{circuitikz}
\caption{Circuito}
\end{figure}

\end{document}

-
Do you know why the syntax described in the package doesn't work? That is, if I load circuitikz with the siunitx option, and say e.g. 5<\ohm> (I also tried $5<\ohm>$, I still get errors even though circuitikz suggests this should work. – cfr Apr 19 '14 at 23:10
@cfr Perhaps the author made changes in the package that are not reflected in the documentation. – Jubobs Apr 19 '14 at 23:16
@cfr See my edit. I'm not 100% sure of what's going on; the documentation is somewhat confusing. – Jubobs Apr 20 '14 at 15:04
Thanks. Methinks there is something wrong with either the documentation or the code (of the package - not yours). The examples in the manual clearly show the <> syntax and yet it does not work whether or not the option for siunitx` is given... +1 for giving code which does work despite the manual. (When I tried, I tried following the examples from the docs and just got errors.) – cfr Apr 20 '14 at 15:54