What is a good way to draw Dynkin diagrams in LaTeX?

I'm about to start writing something up which includes a fair number of Dynkin diagrams, and I can think of several ways of going about it:

• Just draw the darn things in, e.g., InkScape, and include the graphics in the standard way.

• Hack them together using the picture environment or tikz, as this person suggests.

• Abuse the feynmf package, possibly with defining new kinds of "propagator" lines.

Anybody have experience with this sort of task?

-

I would not recommend abusing the feynmf package. In the past I have used the picture environment (with the eepic package) to do precisely this.

Table 6.2 in page 185 of these lecture notes (PDF file), I typeset the Dynkin diagrams using the picture environment. I'm happy to make the code available. Here's a sample for the $A_n$ Dynkin diagram:

\begin{picture}(50,7)
\multiput(5,1)(10,0){5}{\circle{2}}
\multiputlist(10,1)(10,0)%
{{\line(1,0){8}},{\line(1,0){8}},{$\cdots$},{\line(1,0){8}}}
\multiputlist(5,3)(10,0){$\scriptscriptstyle 1$,%
$\scriptscriptstyle 2$,$\scriptscriptstyle 3$,%
$\scriptscriptstyle \ell{-}1$,$\scriptscriptstyle \ell$}
\end{picture}


The diagram is decorated with a labelling of the nodes, by the way.

-
Actually, this only uses the epic package, not the eepic package. –  José Figueroa-O'Farrill Jul 27 '10 at 18:55

Using the Tikz package, I wrote this up for a paper. It gives the classification of the compact Hermitian symmetric spaces, in terms of marked Dynkin diagrams.

\documentclass{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\newcommand{\C}[1]{\mathbb{C}^{#1}}

\newcommand{\dynkinstep}{.35cm}
\newcommand{\dynkinXsize}{1.5}
\newcommand{\dynkincross}[2]{
\draw[thick] (#1*\dynkinstep-\dynkinXsize,#2*\dynkinstep-\dynkinXsize) -- (#1*\dynkinstep+\dynkinXsize,#2*\dynkinstep+\dynkinXsize);
\draw[thick] (#1*\dynkinstep-\dynkinXsize,#2*\dynkinstep+\dynkinXsize) -- (#1*\dynkinstep+\dynkinXsize,#2*\dynkinstep-\dynkinXsize);
}
\newcommand{\dynkinline}[4]{\draw[thin] (\dynkinstep*#1,\dynkinstep*#2) -- (\dynkinstep*#3,\dynkinstep*#4);}
\newcommand{\dynkindots}[4]{\draw[dotted] (\dynkinstep*#1,\dynkinstep*#2) -- (\dynkinstep*#3,\dynkinstep*#4);}
\newcommand{\dynkindoubleline}[4]{\draw[double,postaction={decorate}] (\dynkinstep*#1,\dynkinstep*#2) -- (\dynkinstep*#3,\dynkinstep*#4);}

\newenvironment{dynkin}{\begin{tikzpicture}[decoration={markings,mark=at position 0.7 with {\arrow{>}}}]}
{\end{tikzpicture}}

\begin{document}
\renewcommand*{\arraystretch}{1.5}
\begin{tabular}{>{$}r<{$}m{2cm}m{8cm}}
A_n &
\begin{dynkin}
\dynkinline{1}{0}{2}{0};
\dynkindots{2}{0}{3}{0};
\dynkinline{3}{0}{5}{0};
\dynkindots{5}{0}{6}{0};
\dynkinline{6}{0}{7}{0};
\foreach \x in {1,...,7}
{
\ifnum \x=4 {\dynkincross{\x}{0}}
\else {\dynkindot{\x}{0}}
\fi
}
\end{dynkin}
&
Grassmannian of $k$-planes in $\C{n+1}$ \\
B_n &
\begin{dynkin}
\dynkinline{1}{0}{2}{0};
\dynkindots{2}{0}{3}{0};
\dynkinline{3}{0}{4}{0};
\dynkindoubleline{4}{0}{5}{0};
\dynkincross{1}{0};
\foreach \x in {2,...,5}
{
\dynkindot{\x}{0}
}
\end{dynkin}
&
$(2n-1)$-dimensional hyperquadric, i.e. the variety of null lines in $\C{2n+1}$
\\
C_n
&
\begin{dynkin}
\dynkinline{1}{0}{2}{0};
\dynkindots{2}{0}{3}{0};
\dynkinline{3}{0}{4}{0};
\dynkindoubleline{5}{0}{4}{0};
\dynkincross{5}{0};
\foreach \x in {1,...,4}
{
\dynkindot{\x}{0}
}
\end{dynkin}
&
space of Lagrangian $n$-planes in $\C{2n}$
\\
D_n
&
\begin{dynkin}
\foreach \x in {2,...,4}
{
\dynkindot{\x}{0}
}
\dynkindot{4.5}{.9}
\dynkindot{4.5}{-.9}
\dynkincross{1}{0}
\dynkinline{1}{0}{2}{0}
\dynkindots{2}{0}{3}{0}
\dynkinline{3}{0}{4}{0}
\dynkinline{4}{0}{4.5}{.9}
\dynkinline{4}{0}{4.5}{-.9}
\end{dynkin}
& $(2n-1)$-dimensional hyperquadric, i.e. the variety of null lines in $\C{2n+1}$
\\
D_n
&
\begin{dynkin}
\foreach \x in {1,...,4}
{
\dynkindot{\x}{0}
}
\dynkincross{4.5}{.9}
\dynkindot{4.5}{-.9}
\dynkinline{1}{0}{2}{0}
\dynkindots{2}{0}{3}{0}
\dynkinline{3}{0}{4}{0}
\dynkinline{4}{0}{4.5}{.9}
\dynkinline{4}{0}{4.5}{-.9}
\end{dynkin}
&
one component of the variety of maximal dimension null subspaces of $\C{2n}$
\\
D_n
&
\begin{dynkin}
\foreach \x in {1,...,4}
{
\dynkindot{\x}{0}
}
\dynkincross{4.5}{-.9}
\dynkindot{4.5}{.9}
\dynkinline{1}{0}{2}{0}
\dynkindots{2}{0}{3}{0}
\dynkinline{3}{0}{4}{0}
\dynkinline{4}{0}{4.5}{.9}
\dynkinline{4}{0}{4.5}{-.9}
\end{dynkin}
&
the other component
\\
E_6
&
\begin{dynkin}
\foreach \x in {2,...,5}
{
\dynkindot{\x}{0}
}
\dynkincross{1}{0}
\dynkindot{3}{1}
\dynkinline{1}{0}{5}{0}
\dynkinline{3}{0}{3}{1}
\end{dynkin}
&
complexified octave projective plane
\\
E_6
&
\begin{dynkin}
\foreach \x in {1,...,4}
{
\dynkindot{\x}{0}
}
\dynkincross{5}{0}
\dynkindot{3}{1}
\dynkinline{1}{0}{5}{0}
\dynkinline{3}{0}{3}{1}
\end{dynkin}
&
its dual plane
\\
E_7
&
\begin{dynkin}
\foreach \x in {1,...,5}
{
\dynkindot{\x}{0}
}
\dynkincross{6}{0}
\dynkindot{3}{1}
\dynkinline{1}{0}{6}{0}
\dynkinline{3}{0}{3}{1}
\end{dynkin}
&
the space of null octave 3-planes in octave 6-space
\end{tabular}
\end{document}

-