I went to circuitikz.github.io to download the latest version of circuitikz, and I was able to get the D Flip Flop to appear on my latex file. However, when I try to connect the ports from the D Flip Flop, I get an error. Here's my sample code:

\usepackage{amssymb, graphicx}
\usepackage[american,siunitx, RPvoltages]{circuitikz}
%\input pgfcircmultipoles.tex
    \title{\vspace{-2cm}Random HW}
    \author{John Doe}

%    \tikzset{flipflop D/.style={flipflop, flipflop def={t1=D, t6=Q, c3=1, t4=\ctikztextnot{Q}}}}
    \begin{enumerate}[leftmargin =*]
        \item \pgfcircversion \newline 
                \draw(5,3) node[flipflop D](D1){};
                \draw(D1.Q) -- ++(2, 0);
                \draw(0,2) node[op amp] (opamp){};
                \draw(opamp.out) -- ++(2, 0);

Here, I get an error on the D1.Q, saying that it's

Package PGF Math Error: Unknown function `Q' (in 'Q'). \draw(D1.Q)

Here is the picture enter image description here

Can someone please tell me how to properly connect nodes from the D flip flop? I also attached the op amp code to show you that I tried to follow the format for the D flip flop.

1 Answer 1


Please read section "3.25.2 Flip-flops anchors" of circuitikz manual

"The pins are accessed by the numbers 1 to 6", so write \draw (D1.pin 6) instead of \draw (D1.Q). The example

\documentclass[border = 5 mm]{standalone}
\usepackage[american,siunitx, RPvoltages]{circuitikzgit}
   \node[flipflop D](D1){};
   \draw (D1.pin 6) -- ++(2, 0);

flipflop pin 6

Note: I used here circuitikizgit.sty.

  • 1
    Welcome to TeX.SE. This looks like a great answer to start your career on this site. Commented Feb 1, 2020 at 10:29
  • 1
    @Campanlgnis thank you, very encouraging. Take me a while to find something I could ansewer ;)
    – hkh
    Commented Feb 1, 2020 at 10:36
  • 2
    +1. If you want to know why, the flip-flops can have any text in the labels; making the pin anchor morph with the text was basically impossible (think about math mode content). Nice first answer, congrats!
    – Rmano
    Commented Feb 2, 2020 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .