1

So, I'm having an issue with LaTeX recognizing and rendering the units with how I understand units should be done with circuitikz

Here is my code:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{siunitx}

\begin{document}
    \begin{circuitikz}
        \draw (0,0) to [R=$\SI{100}{\ohm}$] (2,0);
        \draw (3,0) to [R=5<\ohm>] (3,2);
        \draw (0,-2) to[R,label=\mbox{$R_1=\SI{2}{\ohm}$}] (2,-2);
    \end{circuitikz}
\end{document}

I have looked at this post. Which seeks to answer this question, but the code provided there is not working. I've gathered the other ways to do this from other posts, but they do not render either.

This is what my code gives me:

enter image description here

2

You have to use \usepackage[siunitx]{circuitikz}.

  • Doing this does not resolve the problem (I had tried that too). The difference in the output with that rather than \usepackage{circuitikz} and \usepackage{siunitx} is that the "!?" disappears. The units desired do not render with this. – Jeremie Mar 14 '16 at 18:28
  • @Jeremie it works fine here using that way. All units are showed as desired. – jotagah Mar 14 '16 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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