等点間のスペースcircuitikz

等点間のスペースcircuitikz
\documentclass[tikz]{standalone}
\usepackage{circuitikz}
\begin{document}
    \begin{circuitikz}[european, scale=1]
        \draw
            (0,0) node[ocirc]{} --
            ++(right:1) node(point1){} to [R, l=$R$]
            ++(down:2) node(point2){} --
            ++(left:1) node[ocirc]{}
            (node cs:name=point1) node[circ]{} --
            ++(right:2) to [C, l=$C$]
            ++(down:2) --
            (node cs:name=point2) node[circ]{}
        ;
    \end{circuitikz}
\end{document}

point1(定義) とpoint1(使用法)の間にスペースがあるのはなぜですか?

出力コード

答え1

この質問に答えないままにしておくのはもったいない。

コメントの提案に加えてpoint1.centerpoint2.center私の研究ではギャップを埋めるための別の 2 つの代替案も見つかったため、回答として投稿します。

  1. 上のコメントに書いてあります。

新たな発見

  1. 明示的な座標を使用します。
  2. node定義を定義に変更しますcoordinate

ここに画像の説明を入力してください

コード

\documentclass[tikz]{standalone}
\usepackage{circuitikz}
\begin{document}
    \begin{circuitikz}[european, scale=1]
        \draw
            (0,0) node[ocirc]{} --
            ++(right:1) node(point1){} to [R, l=$R$]
            ++(down:2)  node(point2){} --
            ++(left:1) node[ocirc]{}
            (point1.center) node[circ]{} --      % use point1.center instead
            ++(right:2) to [C, l=$C$]
            ++(down:2) --
            (point2.center) node[circ]{}         % use point2.center instead
        ;
    \end{circuitikz}

    \begin{circuitikz}[european,scale=1]
        \draw
            (0,0) node[ocirc]{} --
            ++(right:1) node(point1){} to [R, l=$R$]
            ++(down:2)  node(point2){} --
            ++(left:1) node[ocirc]{}
           (1,0) node[circ]{} --                 % explicit coordinate
            ++(right:2) to [C, l=$C$]
            ++(down:2) --
           (1,-2) node[circ]{}                   % explicit coordinate
        ;
    \end{circuitikz}

    \begin{circuitikz}[european,scale=1]
        \draw
            (0,0) node[ocirc]{} --
            ++(right:1)  coordinate(point1){} to [R, l=$R$]  % use coordinate instead
            ++(down:2)   coordinate(point2){} --             % use coordinate instead
            ++(left:1) node[ocirc]{}
            (node cs:name=point1) node[circ]{} --
            ++(right:2) to [C, l=$C$]
            ++(down:2)--
            (node cs:name=point2) node[circ]{}{}
        ;
    \end{circuitikz}
\end{document}

関連情報