我想在 Latex 中创建下图。您有什么建议吗?
提前致谢,
最好的
编辑
我到目前为止尝试过的:
我尝试了下面的代码,但是无法绘制圆圈。此外,也无法在圆圈内添加字母。
\usepackage[all,cmtip]{xy}
\usepackage{tikz-cd}
\usepackage{tikz}
\begin{displaymath}
\xymatrix{
A & & B \ar[ll] \ar[d] & C \ar[l] \ar[d] \\
& D \ar[ur] & E \ar[u] & F \ar[l] \ar[u] \\
& & G \ar[dl] \ar[u] & H \ar[l] \ar[u] \\
& I \ar[r] & J \ar[u] \ar[d] & K \ar[u] \\
& & L \ar[ur] &
}
\end{displaymath}
答案1
这是我的第一张图片的工作流程。我会使用这种方法,我tikz
个人更喜欢使用\usetikzlibrary{calc}
这种方法。定义节点的位置,画一些圆圈,然后画箭头。
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\tikzset{%
every node/.style={draw, circle, minimum size=0.5cm},
}
\begin{tikzpicture}
%nodes
\node(A) at (0,0) {A};
\node(B)[anchor=west] at ($(A.east) + (2,0)$) {B};
\node(C)[anchor=west] at ($(B.east) + (2,0)$) {C};
\node(E)[anchor=north] at ($(B.south) + (0,-1)$) {E};
\node(F) at (E-|C) {F};
\node(D)[anchor=east] at ($(E.west) + (-1,0)$) {D};
\node(G)[anchor=north] at ($(E.south) + (0,-3)$) {G};
\node(H) at (G-|F) {H};
\node(J)[anchor=north] at ($(G.south) + (0.5,-1)$) {J};
\node(K)[anchor=north] at ($(H.south) + (0.5,-1)$) {K};
\node(I)[anchor=east] at ($(J.west) + (-1,0)$) {I};
\node(L)[anchor=north] at ($(J.south) + (1,-1)$) {L};
%grouping circles
\draw[densely dashed] (A) circle[radius=0.75cm];
\draw[densely dashed] (D) circle[radius=0.75cm];
\draw[densely dashed] ($(B)!0.5!(E)$) circle [x radius=0.75cm, y radius=1.5cm];
\draw[densely dashed] ($(C)!0.5!(F)$) circle [x radius=0.75cm, y radius=1.5cm];
\draw[densely dashed] ($(I)!0.5!(K)$) circle [radius=3cm];
%arrows
\draw[-latex] (B) edge (A);
\draw[-latex] (D) edge (B);
\draw[-latex] (C) edge (B);
\draw[-latex] (E) edge[bend right] (B);
\draw[-latex] (B) edge[bend right] (E);
\draw[-latex] (F) edge[bend right] (C);
\draw[-latex] (C) edge[bend right] (F);
\draw[-latex] (F) edge (E);
\draw[-latex] (G) edge (E);
\draw[-latex] (H) edge (F);
\draw[-latex] (H) edge (G);
\draw[-latex] (G) edge (I);
\draw[-latex] (I) edge (J);
\draw[-latex] (J) edge (G);
\draw[-latex] (J) edge (L);
\draw[-latex] (L) edge (K);
\draw[-latex] (K) edge (H);
\end{tikzpicture}
\end{document}
现在您可以尝试找到正确的图片。如果您需要帮助,请告诉我。