Circuitikz에서 특수 요소(가운데에 십자 표시가 있는 선)를 그립니다.

Circuitikz에서 특수 요소(가운데에 십자 표시가 있는 선)를 그립니다.

다음과 같은 와이어를 그려야 합니다.

여기에 이미지 설명을 입력하세요

이것이 제 강사가 조셉슨 접합에 사용하는 기호입니다. 조금 구글링을 해보니 그런 요소에 대해 일반적으로 사용되는 기호인 것 같으니, 이를 Circuitikz에서 구현하는 방법이 있으면 유용할 것 같습니다.

나는 pgfplots뿐만 아니라 을 사용하는데, 이로 인해 차이가 있는 경우 tikzexternalize로 Circuitikz 환경을 시작해야 합니다 .\begin{tikzpicture}


편집(댓글에서 요청한 대로): 다음 사이에 요소를 사용하고 싶습니다.그리고다음 회로에서:

\begin{figure}[ht]
  \centering
\begin{tikzpicture}
      \draw (0,0)
        node[label={[font=\footnotesize]above:a}] {}
      to[short,*-*] (1.732,1)
        node[label={[font=\footnotesize]above:d}] {};
      \draw (0,0)
      to[C=$C$,*-*] (-1.732,1)
        node[label={[font=\footnotesize]above:b}] {};
      \draw (0,0)
      to[L=$L$,*-*] (0,-2)
        node[label={[font=\footnotesize]east:c}] {};
\end{tikzpicture}
    \caption{Explaining conventions}
\end{figure}

코드는 내 문서에서 다음을 생성합니다. 여기에 이미지 설명을 입력하세요

답변1

circuitikz다음과 같은 기본 기호 사용 barrier:

여기에 이미지 설명을 입력하세요

\documentclass{article}
\usepackage{circuitikz}
\begin{document}

\begin{figure}[ht]
  \centering
\begin{tikzpicture}
      \draw (0,0)
        node[label={[font=\footnotesize]above:a}] {}
      to[barrier,*-*] (1.732,1)
        node[label={[font=\footnotesize]above:d}] {};
      \draw (0,0)
      to[C=$C$,*-*] (-1.732,1)
        node[label={[font=\footnotesize]above:b}] {};
      \draw (0,0)
      to[L=$L$,*-*] (0,-2)
        node[label={[font=\footnotesize]east:c}] {};
\end{tikzpicture}
    \caption{Explaining conventions}
\end{figure}

\end{document}

답변2

자신만의 구성 요소를 만들 수 있습니다. 여기에 예가 있지만 약간의 조정이 필요할 수 있습니다.

여기에 이미지 설명을 입력하세요

다음을 사용하여 너비와 높이를 조정할 수 있습니다.

\ctikzset{bipoles/josephsonjunction/height/.initial=.30}   % box height
\ctikzset{bipoles/josephsonjunction/width/.initial=.30}    % box width

... 그리고 다음을 사용하여 선 너비를 지정합니다.

\pgfsetlinewidth{3\pgfstartlinewidth}

코드:

\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usepackage{circuitikz}

\makeatletter
% used to process styles for to-path
\def\TikzBipolePath#1#2{\pgf@circ@bipole@path{#1}{#2}}
% restore size value for bipole definitions
\pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\makeatother
\newlength{\ResUp}
\newlength{\ResDown}
\newlength{\ResLeft}
\newlength{\ResRight}

%  josephsonjunction
\ctikzset{bipoles/josephsonjunction/height/.initial=.30}   % box height
\ctikzset{bipoles/josephsonjunction/width/.initial=.30}    % box width
\pgfcircdeclarebipole{}                                    % no extra anchors
{\ctikzvalof{bipoles/josephsonjunction/height}}
{josephsonjunction}                                        % component name
{\ctikzvalof{bipoles/josephsonjunction/height}}
{\ctikzvalof{bipoles/josephsonjunction/width}}
{                                                          % component symbol drawing...
  \pgfextracty{\ResUp}{\northeast}                         % coordinates
  \pgfextracty{\ResDown}{\southwest}
  \pgfextractx{\ResLeft}{\southwest}
  \pgfextractx{\ResRight}{\northeast}
  \pgfsetlinewidth{3\pgfstartlinewidth}
  \pgfmoveto{\pgfpoint{\ResLeft}{\ResDown}}
  \pgflineto{\pgfpoint{\ResRight}{\ResUp}}
  \pgfmoveto{\pgfpoint{\ResRight}{\ResDown}}
  \pgflineto{\pgfpoint{\ResLeft}{\ResUp}}
  \pgfusepath{draw}
  \pgfsetlinewidth{\pgfstartlinewidth}
  \pgfmoveto{\pgfpoint{\ResLeft}{0}}
  \pgflineto{\pgfpoint{\ResRight}{0}}
  \pgfusepath{draw}
}
\def\circlepath#1{\TikzBipolePath{josephsonjunction}{#1}}
\tikzset{josephsonjunction/.style = {\circuitikzbasekey, /tikz/to path=\circlepath, l=#1}}

\begin{document}
\begin{tikzpicture}
  \draw (0,0)
    node[label={[font=\footnotesize]above:a}] {}
    to[josephsonjunction,*-*] (1.732,1) % using the josephsonjunction
    node[label={[font=\footnotesize]above:d}] {};
  \draw (0,0)
    to[C=$C$,*-*] (-1.732,1)
    node[label={[font=\footnotesize]above:b}] {};
  \draw (0,0)
    to[L=$L$,*-*] (0,-2)
    node[label={[font=\footnotesize]east:c}] {};
\end{tikzpicture}
\end{document}

관련 정보