Since I am new to tikz I have made an attempt to draw the subgroup lattice in G, but struggling to make it work.
what I have tried
\begin{figure}
\begin{tikzpicture}[node distance=2cm]
\title{Untergruppenverband der $A_4$}
\node(G) {$G$};
\node(81) [below left of=G] {$\langle\sigma^2,\tau\rangle$};
\node(82) [below of=G] {$\langle\sigma\rangle$};
\node(83) [below right of=G] {$\langle\sigma^2,\tau\sigma\rangle$};
\node(41) [below left of=81] {$\langle\tau\sigma^2,\sigma^4\rangle$};
\node(42) [below of=81] {$\langle\tau,\sigma^4\rangle$};
\node(43) [below of=82] {$\langle\sigma^2\rangle$};
\node(44) [below of=83] {$\langle\tau\sigma\rangle$};
\node(45) [below right of=83] {$\langle\tau\sigma^3$};
\node(21) [below right of=41] {$\langle\tau\sigma^6\rangle$}
\node(22) [below of=41] {$\langle\tau\sigma^2\rangle$}
\node(23) [below of=42] {$\langle\tau\sigma^4\rangle$}
\node(24) [below right of=42] {$\tau$}
\node(25) [below of=43] {$\sigma^4$}
\node(1) [below of=25] {$1$}
\draw(G) -- (81);
\draw(G) -- (82);
\draw(G) -- (83);
\draw(81) -- (41);
\draw(81) -- (42);
\draw(81) -- (43);
\draw(82) -- (43);
\draw(83) -- (43);
\draw(83) -- (44);
\draw(83) -- (45);
\draw(41) -- (21);
\draw(41) -- (22);
\draw(41) -- (25);
\draw(42) -- (23);
\draw(42) -- (24);
\draw(42) -- (25);
\draw(21) -- (1);
\draw(22) -- (1);
\draw(23) -- (1);
\draw(24) -- (1);
\draw(24) -- (1);
\end{tikzpicture}
\caption{Lattice of subgroups of G}
\end{figure}
Where the nodes 81-83 correspond to the nodes from left to right below G, in a similar fashion 41 corresponds to the first below 81 from the left.
The desired result
Best Answer
You're pretty close. Use the
positioning
library. Then the correct syntax isbelow=of G
, notbelow of=G
. The node distance is measured along the diagonals, which is preventing the rows from lining up, so only position your nodes withleft
,right
andbelow
. This requires some reordering.Lastly, you may want to use a single draw command, so that if you want to change the style of all the lines you only have to do it once, for example
\draw[thick]
.