0

How can I draw flip-flops and why doesn't this work?

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
\draw (3,0) node[flipflop JK, add async SR, rotate=90]{};
\end{circuitikz}
\end{document}
yo'
  • 51,322
amygdala27
  • 105
  • 9
  • 1
    Your code works here. Do you have the log file? –  May 10 '20 at 15:26
  • Hi, welcome. It works fine for me as well, though I have no idea if the output makes sense. What exactly do you mean when you say it doesn't work? – Torbjørn T. May 10 '20 at 15:28
  • Package pgfkeys Error: I do not know the key '/tikz/flipflop JK' and I am going to ignore it Package pgfkeys Error: I do not know the key '/tikz/add async SR' and I am going to ignore it – amygdala27 May 10 '20 at 15:28
  • I see in the circuitikz manual that flipflops were added in version 1.0.0, so if you have an older version you need to upgrade. You can check the version with \documentclass{article} \usepackage{circuitikz} \begin{document} \pgfcircversion \end{document}. How exactly you can update the package, if that is what's needed, depends on which TeX distribution you have installed (MikTeX, TeX Live, MikTeX). – Torbjørn T. May 10 '20 at 15:32
  • I use overleaf and when i type \pgfcircversion don't get anything on screen – amygdala27 May 10 '20 at 15:34
  • 1
    Are you sure? I get 0.9.7. Overleaf currently doesn't have anything newer than TeX Live 2019, which doesn't have v1 of circuitikz, so apart from waiting until they make TL 2020 available (they're working on it, but I don't know when that will happen), I would guess you have to manually upload all the files for circuitikz v1 to your project to make the code in your question work. Which is a bit inconvenient, and there are multiple files. – Torbjørn T. May 10 '20 at 15:42
  • See https://tex.stackexchange.com/questions/524328/i-need-to-use-a-different-version-of-circuitikz-how-can-i-do-that – Rmano May 10 '20 at 21:02
  • @TorbjørnT. it's a bit of a hack, but you can do that with a single file (plus a style file if you need/want it). I have it explained in the Q&A linked above. – Rmano May 11 '20 at 08:06

0 Answers0