奇怪的 circuitikz 错误

奇怪的 circuitikz 错误

使用 circuitikz 时出现奇怪的错误。我成功编译了以下代码

\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}

但是,我改变了 Z、JAMN、N 和 JAMZ 的坐标,以使图表更漂亮。

\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}

当我更改代码时,出现以下错误:

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

我退房了! 软件包 tikz 错误:缺少分号,我可能遇到了同样的问题,但我找不到错误发生的位置。我是否忽略了一些显而易见的东西?

答案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};
                             ^^^^

正如错误信息所说的那样。

相关内容