%20relativ%20zueinander.%20Verwenden%20von%20Namen%20von%20Schaltungsteilen%2C%20um%20Mesh-Pfeile%20%E2%80%9Eintuitiv%E2%80%9C%20mit%20%E2%80%9ESteuerelementen%E2%80%9C%20zu%20platzieren..png)
Diese Frage ist ständig meineein anderer. Aufgrund meines Rufs kann ich keine Kommentare zu Antworten hinzufügen. Daher nutze ich die Gelegenheit, um mich zu bedankenJohannes Kormylofür seine Antwort auf meine ursprüngliche Frage. Entschuldigen Sie auch mein falsches Englisch.
Zur Frage:
Für Schaltkreise verwende ich die circuitikz
Syntax, Beispiel
\begin{circuitikz}
\draw
(0,0) to [V = $U$] (0,3)
to [short, i = $I$, -*] (3,3) -- (6,3)
to [R = $R_2$, v = $U_2$, i = $I_2$] (6,0) -- (0,0)
(3,3) to [R = $R_1$, v = $U_1$, i = $I_1$, -*] (3,0);
\end{circuitikz}
Das ist sehr einfach und intuitiv. Aber wenn ich dem Schaltkreis einen Mesh-Pfeil hinzufügen möchte, verwende ich (zusätzlich zum obigen Code; Mesh 1 als Beispiel):
\draw
%
% mesh one (detailed explanation of the implementation)
%
[<-,% direction of the arrow
> = triangle 45,% kind of the arrow end
path picture =% allows ''to paint a picture'' inside of an other ''picture''
{\node[anchor = center]% position of the inner ''picture''
at (path picture bounding box.center)% bordering rectangle,
% centered inside the arrow (arrow is the outer ''picture'')
{$M_1$};}]% text of the inner ''picture''
(1.75,1)% coordinates of the arrow end
arc% arc-shaped arrow
(-60:% angle of the arrow start
170:% angle of the arrow end
.5);% radius of the arc
Das Ergebnis beider Codeteile finden Sie unter dem obigen Link (meine ursprüngliche Frage).
Diese Menge an Code für „nur“ einen Pfeil erscheint mir etwas zu viel, kompliziert und nicht intuitiv.
Was ich möchte:
1.Platzierung von Schaltungsteilen (als Knoten mit Namen) relativ zueinander, analog zum Beispiel „Petri-Netz“ im PGF
Handbuch auf Seite 51 (Abschnitt 3.8):
Kombiniert mit der circuitikz
Syntax (siehe erstes Codebeispiel).
2.Verwenden Sie die Namen der Schaltungsteile, um Mesh-Pfeile intuitiv mit dem controls
Makro zu platzieren (Seite 748, PGF
Handbuch), wie es John Kormylo in seiner Antwort auf meine ursprüngliche Frage getan hat:
\node (M 3) [below] at (0,0) {\phantom{$M_3$}};% reserving space for M 3 under the circuit
\draw
[->, > = triangle 45] (current bounding box.east) .. controls
(current bounding box.south east) ..
(M 3.south) node[above, pos = .95] {$M_3$};% see below
% above: location of the inscription ''M_3'' relative to the arrow end
% pos=: location of the inscription ''M_3'' on the ''x''-axis (arrow beginning is zero,
% arrow end is one)
Ist das möglich? Und wenn ja, wie kann ich das machen? Ich hoffe, Sie verstehen meine Absicht.
Vielen Dank für eure Antworten und Hilfe im Voraus!
Antwort1
Anstatt den Knoten in der Mitte des Bogens zu platzieren, habe ich den Bogen um den Knoten herum platziert. Gleiches Ergebnis, weniger Tastenanschläge. Es gibt auch eine Reihe von Möglichkeiten, die ständige Wiederholung derselben Optionen zu vermeiden. Ich habe einen Bereich verwendet, da die Änderungen nur für die Dauer des Bereichs gelten.
Die Vereinfachung ist größtenteils auf das Entfernen der Kommentare zurückzuführen.
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage{amsmath}
\usepackage[european]{circuitikz}
\usepackage{showframe}
\begin{document}
\noindent
\begin{minipage}[t]{.5\linewidth}
\begin{circuitikz}[baseline=(current bounding box.north)]
%
% circuit
%
\draw
(0,0) to [V = $U$] (0,3)
to [short, i = $I$, -*] (3,3) -- (6,3)
to [R = $R_2$, v = $U_2$, i = $I_2$] (6,0) -- (0,0)
(3,3) to [R = $R_1$, v = $U_1$, i = $I_1$, -*] (3,0);
%
% mesh arrows
%
\begin{scope}[>=triangle 45]
\draw[<-] (1.5,1.5) node{$M_1$} +(.25,-.433) arc(-60:170:.5);
\draw[<-] (4.5,1.5) node{$M_2$} +(.25,-.433) arc(-60:170:.5);
\node (mesh3) [below] at (0,0) {\phantom{$M_3$}};% reserve space below circuit for M_3
\draw[->, thick] (current bounding box.east)% not the only way, just easy
.. controls (current bounding box.south east) ..
(mesh3.south) node[above,pos=.9] {$M_3$};
\end{scope}
\end{circuitikz}
\end{minipage}
\hfill
\begin{minipage}[t]{.45\linewidth}
%
% equations for mesh and knot
%
\begin{align*}
&K : \quad I = I_1 + I_2\\
&M_1: \quad -U = -U_1\Leftrightarrow U = U_1 = R_1I_1\\
&M_2: \quad U_1 = -U_2\\
&M_3: \quad -U = -U_2\Leftrightarrow U = U_2 = R_2I_2
\end{align*}
\end{minipage}
\end{document}