동일한 수평선에서 이러한 그리기를 어떻게 조정할 수 있습니까?

동일한 수평선에서 이러한 그리기를 어떻게 조정할 수 있습니까?

회로는 다음과 같습니다.

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

\begin{circuitikz}[american voltages, baseline=(current bounding box.base)]대신 사용하려고 했지만 \begin{circuitikz}[american voltages, baseline=(current bounding box.center)]\leftrightarrow가 잘못된 위치에 머물렀습니다.

전체 코드:

\documentclass[11pt]{article}

\usepackage{circuitikz}
\usepackage{tikz}                           % for flowcharts

\begin{center}
        \begin{circuitikz}[american voltages, baseline=(current bounding box.center)]
        \ctikzset { label/align = straight }
        \draw (0,0) 
        to[sV_<=$\hat{V_S}$] (0,-2)
        to[short, -o] (3,-2)
        (0,0) to [fullgeneric, l=$\hat{Z_S}$, -o] (3,0)
        {[anchor=west] (3,0) node {a} [anchor=west] (3,-2) node{b}};
        \end{circuitikz}
        $\hspace{0.25in} \displaystyle \Leftrightarrow \hspace{0.25in}$
        \begin{circuitikz}[american voltages, baseline=(current bounding box.center)]
        \ctikzset { label/align = straight }
        \draw (0,0) 
        to[sI=$\hat{I_S}$] (0,-2)
        to[short, -o] (3,-2)
        (0,0) to[short, -*] (2,0)
        to [fullgeneric, l=$\hat{Z_S}$, -*] (2,-2)
        (2,0) to [short, -o] (3,0)
        {[anchor=west] (3,0) node {a} [anchor=west] (3,-2) node{b}};
        \end{circuitikz}
        \end{center}
\end{document}

답변1

회로의 높이가 다르기 때문에 가장 간단한 방법은 위치를 수동으로 수정하는 것 같습니다. 예를 들면 다음과 같습니다.

\documentclass[11pt]{article}

\usepackage{circuitikz}
\usepackage{tikz}                           % for flowcharts'

\begin{document}

%\begin{center}
\begin{tabular}{ccc}
\begin{tabular}{c}
        \begin{circuitikz}[american voltages, baseline=(current bounding box.center)]
       % \ctikzset { label/align = straight }
        \draw (0,0) 
        to[sV_<=$\hat{V_S}$] (0,-2)
        to[short, -o] (3,-2)
        (0,0) to [fullgeneric, l=$\hat{Z_S}$, -o] (3,0)
        {[anchor=west] (3,0) node {a} [anchor=west] (3,-2) node{b}};
        \end{circuitikz}
\end{tabular}
&
\begin{tabular}{c}
\\[5mm]
        $\hspace{0.25in} \displaystyle \Leftrightarrow \hspace{0.25in}$
\end{tabular}
&
\begin{tabular}{c}
\\[5mm]
        \begin{circuitikz}[american voltages, baseline=(current bounding box.center)]
      %  \ctikzset { label/align = straight }
        \draw (0,0) 
        to[sI=$\hat{I_S}$] (0,-2)
        to[short, -o] (3,-2)
        (0,0) to[short, -*] (2,0)
        to [fullgeneric, l=$\hat{Z_S}$, -*] (2,-2)
        (2,0) to [short, -o] (3,0)
        {[anchor=west] (3,0) node {a} [anchor=west] (3,-2) node{b}};
        \end{circuitikz}
 %       \end{center}
\end{tabular}
\end{tabular}
\end{document}

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

관련 정보