以下代码:
%\documentclass[12pt,a4paper]{scrbook}
\documentclass[11pt,
a4paper,
DIV=calc
]{scrartcl}
\usepackage[autooneside=false,automark,markcase=ignoreuppercase,headsepline,plainheadsepline]{scrlayer-scrpage}
%\automark[section]{chapter}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
% scrartcl ist eine abgeleitete Artikel-Klasse im Koma-Skript
% zur Kontrolle des Umbruchs Klassenoption draft verwenden
\usepackage[ngerman]{babel}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{acronym}
\usepackage{subfiles}
\usepackage{nicefrac}
\usepackage{array,cellspace}
\usepackage{bigints}
\usepackage[]{listofsymbols}
\bibliographystyle{alpha}
\usepackage{float}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pdflscape}
\usepackage{trees}
\usepackage[europeanresistors,americaninductors,straightvoltages]{circuitikzgit}
\def\coord(#1){coordinate(#1)}
\def\coord(#1){node[circle, red, draw, inner sep=1pt,pin={[red, overlay, inner sep=0.5pt, font=\tiny, pin distance=0.1cm, pin edge={red, overlay,}]45:#1}](#1){}}
\usetikzlibrary{shapes,arrows,positioning,decorations.markings,calc}
\usepackage{siunitx}
\usepackage{wrapfig}
\usepackage{rotating,booktabs,multirow}
\usepackage{enumerate}
\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc} % Alternativ unter Windows
\usepackage[T1]{fontenc}
\usepackage{latexsym}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{cancel}
\usepackage{morewrites}
\usepackage[toc]{glossaries}
\makeglossaries
\renewcommand*\glspostdescription{\dotfill}
\usepackage[]{listofsymbols}
\usepackage{cases}
\usepackage{minted,xcolor}
\usemintedstyle{monokai}
\definecolor{bg}{HTML}{282828}
\setminted{bgcolor=bg}
% Abstand obere Blattkante zur Kopfzeile ist 2.54cm - 15mm
\setlength{\topmargin}{-15mm}
\usepackage{mathrsfs}
\definecolor{tokloGrey}{rgb}{0.68,0.68,0.68}
% Für Zeichnung
\usetikzlibrary{patterns}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepackage{expl3}
\usepackage{caption}
\usepackage{subcaption}
% Schriftgröße der Caption
\captionsetup[figure]{font=small}
\ExplSyntaxOn
\cs_set_eq:NN \fpeval \fp_eval:n
\ExplSyntaxOff
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
% Microtype - für gleichbleibende Zeilenumbrüche
\usepackage{microtype}
\definecolor{tkblue}{rgb}{0,0.212,0.369}
\definecolor{tkred}{rgb}{1,0.064,0.064}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pst-pdf}
\allowdisplaybreaks
\usepackage{multirow}
\usepackage{array,cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\begin{document}
\begin{landscape}
\begin{figure}[H]
\begin{center}
\hspace*{-0.5cm}
\begin{circuitikz}[scale=0.75,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V<=$U_{\mathrm{in}}$,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,l=$\mathrm{C_{1}}$,*-*] (2,4);
\draw (2,4) to [short] (3,4);
% Horizontaler Zweig
\draw (3.5,4) to node[nigfete,rotate=90](nigfet){} (3.5,4);
\draw (nigfet.G) node[anchor=north]{$\mathrm{S_{buck}}$};
\draw (4.25,4) to [short] (5,4);
% 2. Parallele Zweig (Diode)
\draw (5,0) to [D*,l=$\mathrm{D_1}$,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,l=$\mathrm{L}$,-*] (8,4);
% 3. Parallele Zweig (IGBT)
\draw (8,0) to [short,*-] (8,1.5);
\draw (8,2) to node[nigbt](nigbt){} (8,2);
\draw (nigbt.B) node[anchor=east]{$\mathrm{S_{boost}}$};
\draw (8,2.75) to [short] (8,4);
% Horizontaler Zweig
\draw (8,4) to [D*,l=$\mathrm{D_2}$,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,l=$\mathrm{C_{2}}$,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}
\label{fig:bi_buck_boost_top}
\end{center}
\end{figure}
\begin{figure}[H]
\begin{center}
\hspace*{-0.5cm}
\begin{circuitikz}[scale=0.5,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V<=$U_{\mathrm{in}}$,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,l=$\mathrm{C_{1}}$,*-*] (2,4);
\draw (2,4) to [short] (3,4);
% Horizontaler Zweig
\draw (3.5,4) to node[nigfete,rotate=90](nigfet){} (3.5,4);
\draw (nigfet.G) node[anchor=north]{$\mathrm{S_{buck}}$};
\draw (4.25,4) to [short] (5,4);
% 2. Parallele Zweig (Diode)
\draw (5,0) to [D*,l=$\mathrm{D_1}$,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,l=$\mathrm{L}$] (8,4);
\draw (8,4) to [D*,l=$\mathrm{D_2}$,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,l=$\mathrm{C_{2}}$,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}
\label{fig:bi_buck_boost_top}
\end{center}
\end{figure}
\begin{figure}[H]
\begin{center}
\hspace*{-0.5cm}
\begin{circuitikz}[scale=0.5,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V<=$U_{\mathrm{in}}$,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,l=$\mathrm{C_{1}}$,*-*] (2,4);
\draw (2,4) to [short] (5,4);
\draw (5,0) to [D*,l=$\mathrm{D_1}$,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,l=$\mathrm{L}$,-*] (8,4);
\draw (8,0) to [short,*-] (8,1.5);
\draw (8,2) to node[nigbt](nigbt){} (8,2);
\draw (nigbt.B) node[anchor=east]{$\mathrm{S_{boost}}$};
\draw (8,2.75) to [short] (8,4);
% Horizontaler Zweig
\draw (8,4) to [D*,l=$\mathrm{D_2}$,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,l=$\mathrm{C_{2}}$,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}
\label{fig:bi_buck_boost_top}
\end{center}
\end{figure}
\end{landscape}
\end{document}
产生以下输出:
如您所见,我使用了 3 个 Circuitikz 图形来绘制每个拓扑。我的目标是创建这样的 Tikzpicture:
但我不知道如何将这些图形放入一张新图片中,所以我可以使用通用坐标来创建图片。
编辑:好的,我已经将我的 CircuitikZ 图片嵌入到树木环境中:
%\documentclass[12pt,a4paper]{scrbook}
\documentclass[11pt,
a4paper,
DIV=calc
]{scrartcl}
\usepackage[autooneside=false,automark,markcase=ignoreuppercase,headsepline,plainheadsepline]{scrlayer-scrpage}
%\automark[section]{chapter}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
% scrartcl ist eine abgeleitete Artikel-Klasse im Koma-Skript
% zur Kontrolle des Umbruchs Klassenoption draft verwenden
\usepackage[ngerman]{babel}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{acronym}
\usepackage{subfiles}
\usepackage{nicefrac}
\usepackage{array,cellspace}
\usepackage{bigints}
\usepackage[]{listofsymbols}
\bibliographystyle{alpha}
\usepackage{float}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pdflscape}
\usepackage{trees}
\usepackage[europeanresistors,americaninductors,straightvoltages]{circuitikzgit}
\def\coord(#1){coordinate(#1)}
\def\coord(#1){node[circle, red, draw, inner sep=1pt,pin={[red, overlay, inner sep=0.5pt, font=\tiny, pin distance=0.1cm, pin edge={red, overlay,}]45:#1}](#1){}}
\usetikzlibrary{shapes,arrows,positioning,decorations.markings,calc}
\usepackage{siunitx}
\usepackage{wrapfig}
\usepackage{rotating,booktabs,multirow}
\usepackage{enumerate}
\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc} % Alternativ unter Windows
\usepackage[T1]{fontenc}
\usepackage{latexsym}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{cancel}
\usepackage{morewrites}
\usepackage[toc]{glossaries}
\makeglossaries
\renewcommand*\glspostdescription{\dotfill}
\usepackage[]{listofsymbols}
\usepackage{cases}
\usepackage{minted,xcolor}
\usemintedstyle{monokai}
\definecolor{bg}{HTML}{282828}
\setminted{bgcolor=bg}
% Abstand obere Blattkante zur Kopfzeile ist 2.54cm - 15mm
\setlength{\topmargin}{-15mm}
\usepackage{mathrsfs}
\definecolor{tokloGrey}{rgb}{0.68,0.68,0.68}
% Für Zeichnung
\usetikzlibrary{patterns}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepackage{expl3}
\usepackage{caption}
\usepackage{subcaption}
% Schriftgröße der Caption
\captionsetup[figure]{font=small}
\ExplSyntaxOn
\cs_set_eq:NN \fpeval \fp_eval:n
\ExplSyntaxOff
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
% Microtype - für gleichbleibende Zeilenumbrüche
\usepackage{microtype}
\definecolor{tkblue}{rgb}{0,0.212,0.369}
\definecolor{tkred}{rgb}{1,0.064,0.064}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pst-pdf}
\allowdisplaybreaks
\usepackage{multirow}
\usepackage{array,cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\begin{document}
\begin{landscape}
\begin{figure}[htbp]
\centering
\begin{tikzpicture}
[auto]
\tikzset{
treenode/.style={align=center, rectangle, draw=black},
root/.style={treenode, inner sep= 5pt, text width = 12.5cm},
1/.style={treenode, inner sep= 5pt, text width = 10cm},
2/.style={treenode, inner sep= 5pt, text width = 1.5cm},
level1/.style = {sibling distance=11cm, level distance=5.5cm},
level2/.style = {sibling distance=3cm, level distance=2.5cm}
}
\node[root]{ \begin{figure}[H]
\begin{center}
\begin{circuitikz}[scale=0.75,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,*-*] (2,4);
\draw (2,4) to [short] (3,4);
% Horizontaler Zweig
\draw (3.5,4) to node[nigfete,rotate=90](nigfet){} (3.5,4);
%\draw (nigfet.G) node[anchor=north]{$\mathrm{S_{buck}}$};
\draw (4.25,4) to [short] (5,4);
% 2. Parallele Zweig (Diode)
\draw (5,0) to [D*,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,-*] (8,4);
% 3. Parallele Zweig (IGBT)
\draw (8,0) to [short,*-] (8,1.5);
\draw (8,2) to node[nigbt](nigbt){} (8,2);
%\draw (nigbt.B) node[anchor=north]{$\mathrm{S_{boost}}$};
\draw (8,2.75) to [short] (8,4);
% Horizontaler Zweig
\draw (8,4) to [D*,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
%\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}
\label{fig:bi_buck_boost_top}
\end{center}
\end{figure}}
child[level1]{node[1]{\begin{figure}[H]
\begin{center}
\begin{circuitikz}[scale=0.5,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,*-*] (2,4);
\draw (2,4) to [short] (3,4);
% Horizontaler Zweig
\draw (3.5,4) to node[nigfete,rotate=90](nigfet){} (3.5,4);
%\draw (nigfet.G) node[anchor=north]{$\mathrm{S_{buck}}$};
\draw (4.25,4) to [short] (5,4);
% 2. Parallele Zweig (Diode)
\draw (5,0) to [D*,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor] (8,4);
\draw (8,4) to [D*,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
%\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}
\label{fig:bi_buck_boost_top}
\end{center}
\end{figure}}
child[level2]{node[2]{$\mathrm{S_{buck:on}}$}}
child[level2]{node[2]{$\mathrm{S_{buck:off}}$}}}
child[level1]{node[1]{\begin{figure}[H]
\begin{center}
\begin{circuitikz}[scale=0.5,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,*-*] (2,4);
\draw (2,4) to [short] (5,4);
\draw (5,0) to [D*,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,-*] (8,4);
\draw (8,0) to [short,*-] (8,1.5);
\draw (8,2) to node[nigbt](nigbt){} (8,2);
%\draw (nigbt.B) node[anchor=north]{$\mathrm{S_{boost}}$};
\draw (8,2.75) to [short] (8,4);
% Horizontaler Zweig
\draw (8,4) to [D*,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
%\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}
\label{fig:bi_buck_boost_top}
\end{center}
\end{figure}}
child[level2]{node[2]{$\mathrm{S_{boost:on}}$}}
child[level2]{node[2]{$\mathrm{S_{boost:off}}$}}};
\end{tikzpicture}
\caption{<caption>}
\label{<label>}
\end{figure}
\end{landscape}
\end{document}
它看起来像这样:
但我不知道如何实现 4 级(Zustandsraum)节点,以及如何将它们合并到 5 级(SSA)。
答案1
通常强烈建议在节点中\savebox
使用 a 时使用 es tikzpicture
。这也适用于节点的内容forest
,我将使用它来绘制此图。因此电路进入forest
节点,其余部分或多或少是标准的,但需要注意的是,树的下半部分是手工绘制的,因为实际上不支持合并分支。除此之外,我将示例简化为更简单的内容。
\documentclass[11pt,a4paper,DIV=calc]{scrartcl}
\usepackage[autooneside=false,automark,markcase=ignoreuppercase,headsepline,plainheadsepline]{scrlayer-scrpage}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
\usepackage{pdflscape}
\usepackage[europeanresistors,americaninductors,straightvoltages]{circuitikzgit}
\usepackage[edges]{forest}
\usetikzlibrary{positioning}
\newsavebox\circuiti
\newsavebox\circuitii
\newsavebox\circuitiii
\begin{document}
\begin{landscape}
\begin{figure}[htbp]
\centering\tikzset{medge/.style={thick,-stealth}}
\savebox\circuiti{\begin{circuitikz}[scale=0.75,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,*-*] (2,4);
\draw (2,4) to [short] (3,4);
% Horizontaler Zweig
\draw (3.5,4) to node[nigfete,rotate=90](nigfet){} (3.5,4);
%\draw (nigfet.G) node[anchor=north]{$\mathrm{S_{buck}}$};
\draw (4.25,4) to [short] (5,4);
% 2. Parallele Zweig (Diode)
\draw (5,0) to [D*,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,-*] (8,4);
% 3. Parallele Zweig (IGBT)
\draw (8,0) to [short,*-] (8,1.5);
\draw (8,2) to node[nigbt](nigbt){} (8,2);
%\draw (nigbt.B) node[anchor=north]{$\mathrm{S_{boost}}$};
\draw (8,2.75) to [short] (8,4);
% Horizontaler Zweig
\draw (8,4) to [D*,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
%\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}}%
\savebox\circuitii{\begin{circuitikz}[scale=0.5,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,*-*] (2,4);
\draw (2,4) to [short] (3,4);
% Horizontaler Zweig
\draw (3.5,4) to node[nigfete,rotate=90](nigfet){} (3.5,4);
%\draw (nigfet.G) node[anchor=north]{$\mathrm{S_{buck}}$};
\draw (4.25,4) to [short] (5,4);
% 2. Parallele Zweig (Diode)
\draw (5,0) to [D*,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor] (8,4);
\draw (8,4) to [D*,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
%\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}}%
\savebox\circuitiii{\begin{circuitikz}[scale=0.5,transform shape]
\draw (-1,0) to [short] (11,0);
\draw (-1,0) to [V,invert] (-1,4);
\draw (-1,4) to [short,-*] (2,4);
% 1. Parallele Zweig
\draw (2,0) to [C,*-*] (2,4);
\draw (2,4) to [short] (5,4);
\draw (5,0) to [D*,*-*] (5,4);
% Horizontaler Zweig
\draw (5,4) to [cute inductor,-*] (8,4);
\draw (8,0) to [short,*-] (8,1.5);
\draw (8,2) to node[nigbt](nigbt){} (8,2);
%\draw (nigbt.B) node[anchor=north]{$\mathrm{S_{boost}}$};
\draw (8,2.75) to [short] (8,4);
% Horizontaler Zweig
\draw (8,4) to [D*,-*] (11,4);
% 3. Parallele Zweig
\draw (11,0) to [C,*-*] (11,4);
% Last-Zweig
\draw (11,4) to [short,-o] (14,4);
\draw (11,0) to [short,-o] (14,0);
\draw[->] (14,3.75) -- (14,0.25);
%\draw (14.25,2) node[anchor=west] {$U_{\mathrm{out}}$};
\end{circuitikz}}%
\begin{forest}
forked edges,
for tree={anchor=center,
edge={medge},
l sep=2em,
fork sep=1em,
font=\sffamily,
text depth=0.25ex,
execute at begin node=\strut
}
[\usebox\circuiti,alias=i
[\usebox\circuitii,alias=ii
[on,alias=on
[$\vec X_\mathrm{pft}$,alias=pft1]
]
[off
[$\vec X_\mathrm{pft}$,alias=pft2]
]
]
[\usebox\circuitiii
[on
[$\vec X_\mathrm{pft}$,alias=pft3]
]
[off
[$\vec X_\mathrm{pft}$,alias=pft4]
]
]
]
\begin{scope}[font=\sffamily]
\path (pft1.south) -- (pft2.south) node[midway,below=2em](bulk)
{$\langle\vec X_\mathrm{bulk}\rangle$};
\path (pft3.south) -- (pft4.south) node[midway,below=2em](boost)
{$\langle\vec X_\mathrm{boost}\rangle$};
\draw[medge] (pft1.south) -- ++ (0,-1em) -| (bulk);
\draw[medge] (pft2.south) -- ++ (0,-1em) -| (bulk);
\draw[medge] (pft3.south) -- ++ (0,-1em) -| (boost);
\draw[medge] (pft4.south) -- ++ (0,-1em) -| (boost);
\node[below left=2em and 1em of bulk.south] (stat) {station\"are W.};
\node[below right=2em and 1em of bulk.south] (Lin1) {Linearisiering};
\node[below left=2em and 1em of boost.south] (nix) {station\"are W.};
\node[below right=2em and 1em of boost.south] (Lin2) {Linearisiering};
\draw[medge] (bulk) -- (stat);
\draw[medge] (bulk) -- (Lin1);
\draw[medge] (boost) -- (nix);
\draw[medge] (boost) -- (Lin2);
\path (current bounding box.west) coordinate[left=1em] (L);
%
\path (L|-i) node[left]{Kaskadiert};
\path (L|-ii) node[left]{Topologie};
\path (L|-on) node[left]{Schaltzust\"ande};
\path (L|-pft1) node[left]{Zustandsraum};
\path (L|-bulk) node[left]{SSA};
\end{scope}
\end{forest}
\caption{Some caption.}
\label{fig:3circuits}
\end{figure}
\end{landscape}
\end{document}
答案2
嵌套tikzpicture
通常是不受欢迎的(在这里搜索“嵌套 tikzpicture”...),因为结果无法保证。
在这些情况下,当电路必须重复时,我通常会定义一个宏来绘制相对于参数(即坐标)的电路。在宏中,我定义了一组coordinate
s,它们随后可用于构建图表的其余部分。
以下只是一个小例子,但希望可以给你一点启发。
\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usetikzlibrary{calc}
%\usectikzstyle{romano}
\newcommand{\mycirc}[3][]{% define the circuit relative to the (external)
% coordinate; use as \mycirc[options]{coord}{name}
% it will define the coordinate nw-name, sw-name etc. for further references
\begin{scope}[#1]
\draw #2 coordinate (start)
to[V] ++(0,2) to[short, *-*]
++(2,0) coordinate(R) to [D] (R|-start)
to [short, *-*] (start);
\path (start) ++(-1,-1) coordinate(sw-#3)
(R) ++(1,1) coordinate (ne-#3)
(sw-#3 |- ne-#3) coordinate (nw-#3)
(sw-#3 -| ne-#3) coordinate (se-#3);
\draw [thin] (sw-#3) rectangle (ne-#3);
\end{scope}
}
\begin{document}
\begin{circuitikz}
\mycirc{(0,0)}{top}
\mycirc[scale=0.7, transform shape]{(-5,-7)}{left}
\mycirc[scale=0.7, transform shape]{(6,-7)}{right}
\draw[red] ([yshift=-0.2cm]$(sw-top)!0.5!(se-top)$) -- ++(0,-0.5) coordinate(a);
\draw [red,->] (a) -| ([yshift=0.2cm]$(nw-left)!0.5!(ne-left)$);
\end{circuitikz}
\end{document}