2

I'm getting a strange error when using circuitikz. I compiled the following code successfully

\begin{center}
\begin{circuitikz}
    \draw (1,2) node[and port] (and1) {}
          (1,4) node[and port] (and2) {}
          (-2,1) node (Z) {Z}
          (-2,2) node (JAMN) {JAMN}
          (-2,3) node (N) {N}
          (-2,4) node (JAMZ) {JAMZ}
\end{circuitikz}
\end{center}

However, I changed up the coords of Z, JAMN, N, and JAMZ to make the diagram prettier.

\begin{center}
\begin{circuitikz}
    \draw (1,2) node[and port] (and1) {}
          (1,4) node[and port] (and2) {}
          (-2,1.5) node (Z) {Z}
          (-2,2.5) node (JAMN) {JAMN}
          (-2,3.5) node (N) {N}
          (-2,4.5) node (JAMZ) {JAMZ}
\end{circuitikz}
\end{center}

When I changed the code, I got the following error:

! Package tikz Error: Giving up on this path. Did you forget a semicolon?

I checked out ! Package tikz Error: missing semicolon, and I may have the same problem, but I can't find where the error is occurring. Am I missing something obvious?

1
  • The commands in TikZ and other related packages need to be finalized with a semicolon. You are missing it.
    – percusse
    Oct 12 '14 at 17:25
1
\draw (1,2) node[and port] (and1) {}
      (1,4) node[and port] (and2) {}
      (-2,1) node (Z) {Z}
      (-2,2) node (JAMN) {JAMN}
      (-2,3) node (N) {N}
      (-2,4) node (JAMZ) {JAMZ};
                             ^^^^

as the error message already said.

1
  • Thank you. Now everything works. The confusing part was that the tex file initially compiled WITHOUT the semi-colon, but then failed to compile after that initial compilation.
    – BrianRT
    Oct 12 '14 at 18:40

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.