Circuitikz с этикетками на правой стороне

Circuitikz с этикетками на правой стороне

Я пытаюсь поместить все значения компонентов на правую сторону схемы. Я видел решения с использованием узлов меток в circuitikz, но предпочитаю разделять их.

Мне удалось придумать только следующее. Мне нужно либо разместить метки сверху, либо по центру-вертикали рядом со схемой.

\documentclass{article}
\usepackage{amsmath}
\usepackage{circuitikz}

\begin{document}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|}
\begin{circuitikz}[european]
\draw (0,0)
    node[tlground]{} % The ground
    to[V, v^<=$U_0$] (0,2) % The voltage source
    to[C, l=$C_1$] (2,2) % The capacitor
    to[R=$R_B$] (2,5); % The resistor
\draw
    (4,2) node[npn, tr circle] (Q1) {} % The transistor
    (Q1.base) to[short] (2,2) % The short
    (Q1.collector) to[R=$R_C$] (4,5) % The resistor
    (4,3) to[short] (5,3) % The short
    node[label={[font=\footnotesize]right:$V_{out}$}] {}
    (Q1.emitter) to[short] (4,0) % The short
    node[tlground]{};
\draw (0,5)
    node[label={[font=\footnotesize]left:$+V_{cc}$}] {}
    to[short] (5,5);
\end{circuitikz}

&

% Add labels for component values on the right side
\begin{tabular}[t]{l}
    $R_1 = 1\text{k}\Omega$\\
    $C_1 = 10\mu\text{F}$\\
    $L_1 = 100\text{mH}$
\end{tabular}
\end{tabular}
\end{table}

\end{document}

введите описание изображения здесь

решение1

А, понял. Обычно я выбираю элемент на чертеже схемы, даю ему имя (называю узел или элемент), а затем выравниваю таблицу по базовой линии этого элемента. Например, в следующем примере таблица выравнивается по узлу +V_CC:

\documentclass{article}
\usepackage{amsmath}
\usepackage{circuitikz}

\begin{document}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|}
\begin{circuitikz}[european, baseline=(REF.base)]
\draw (0,0)
    node[tlground]{} % The ground
    to[V, v^<=$U_0$] (0,2) % The voltage source
    to[C, l=$C_1$] (2,2) % The capacitor
    to[R=$R_B$] (2,5); % The resistor
\draw
    (4,2) node[npn, tr circle] (Q1) {} % The transistor
    (Q1.base) to[short] (2,2) % The short
    (Q1.collector) to[R=$R_C$] (4,5) % The resistor
    (4,3) to[short] (5,3) % The short
    node[label={[font=\footnotesize]right:$V_{out}$}] {}
    (Q1.emitter) to[short] (4,0) % The short
    node[tlground]{};
\draw (0,5)
    node[label={[font=\footnotesize]left:$+V_{cc}$}](REF) {}
    to[short] (5,5);
\end{circuitikz}

&

% Add labels for component values on the right side
\begin{tabular}[t]{l}
    $R_1 = 1\text{k}\Omega$\\
    $C_1 = 10\mu\text{F}$\\
    $L_1 = 100\text{mH}$
\end{tabular}
\end{tabular}
\end{table}

\end{document}

введите описание изображения здесь

Или, например, с меткой R_C:

\documentclass{article}
\usepackage{amsmath}
\usepackage{circuitikz}

\begin{document}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|}
\begin{circuitikz}[european, baseline=(REFlabel.base)]
\draw (0,0)
    node[tlground]{} % The ground
    to[V, v^<=$U_0$] (0,2) % The voltage source
    to[C, l=$C_1$] (2,2) % The capacitor
    to[R=$R_B$] (2,5); % The resistor
\draw
    (4,2) node[npn, tr circle] (Q1) {} % The transistor
    (Q1.base) to[short] (2,2) % The short
    (Q1.collector) to[R=$R_C$, name=REF] (4,5) % The resistor
    (4,3) to[short] (5,3) % The short
    node[label={[font=\footnotesize]right:$V_{out}$}] {}
    (Q1.emitter) to[short] (4,0) % The short
    node[tlground]{};
\draw (0,5)
    node[label={[font=\footnotesize]left:$+V_{cc}$}] {}
    to[short] (5,5);
\end{circuitikz}

&

% Add labels for component values on the right side
\begin{tabular}[t]{l}
    $R_1 = 1\text{k}\Omega$\\
    $C_1 = 10\mu\text{F}$\\
    $L_1 = 100\text{mH}$
\end{tabular}
\end{tabular}
\end{table}

\end{document}

введите описание изображения здесь

BTW: Я настоятельно рекомендую использовать siunitxупаковку для единиц измерения. Это μ в микрофарадах должнонетбыть в математическом режиме...

Связанный контент