Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm sorry for asking a similar question to this tex.SE question, but my motivation is different.

I'd like to replicate the affine Dynkin diagrams as in Kac's textbook, see pp. 53, 54 and 55 of the third edition. Here are links to the pages in Google Books: p. 53, p. 54 and p. 55.

Judging from the fonts used, he or the typesetter used simple TeX symbols as much as possible, including the double-lined arrows, \Leftarrow etc., instead of using generic diagramming packages. How can I do that?

It's a stupid question, not applicable to drawing generic diagrams, but I liked Kac's "minimalism". Also, his textbook is like a Bible in this field of mathematics, so I just want to follow his example, even in typesetting affine Dynkin diagrams!

Thanks in advance.


(Update) Thanks to the answers of all of you, I put the following diagrams in my paper:

affine Dynkin diagrams

see page 9 of the paper.

share|improve this question
    
This looks like a dupe to me - would vote to close if I were not a mod –  Joseph Wright Nov 13 '10 at 9:39
    
Sorry for looking like a dupe, but I really want to reproduce the Table in this textbook: books.google.co.jp/… –  Yuji Nov 13 '10 at 9:45
    
Maybe you should rephrase your question. I guess the hard part is how to draw triple and quadruple arrows? At least, that is the only thing I don't know by heart how to achieve it in TikZ and I can't find anything about it. The rest is just regular Dynkin stuff, which boils down to drawing graphs. –  Pieter Nov 13 '10 at 9:59
    
I guess when Kac's book was written pgf/TikZ was not available; shouldn't there be an elementary way? I like the way Kac used the standard arrows which is part of math fonts, not the generated arrows in XyPic or pgf. The triple arrow comes with AMSTeX, it's called \Lleftarrow and \Rrightarrow. –  Yuji Nov 13 '10 at 10:16
1  
That's not my essential point; my point is to reproduce what Kac has in his textbook. I changed the title of the question after @Joseph Wright gave me the comment. Indeed I didn't express my intent correctly. –  Yuji Nov 13 '10 at 14:48

3 Answers 3

up vote 10 down vote accepted

And now let me show you the right way to do it.

\documentclass{article}
\pagestyle{empty}
\usepackage[paperheight=40cm,scale=.97]{geometry}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{chains}

\tikzset{node distance=2em, ch/.style={circle,draw,on chain,inner sep=2pt},chj/.style={ch,join},every path/.style={shorten >=4pt,shorten <=4pt},line width=1pt,baseline=-1ex}

\newcommand{\alabel}[1]{%
  \(\alpha_{\mathrlap{#1}}\)
}

\newcommand{\mlabel}[1]{%
  \(#1\)
}

\let\dlabel=\alabel
\let\ulabel=\mlabel

\newcommand{\dnode}[2][chj]{%
\node[#1,label={below:\dlabel{#2}}] {};
}

\newcommand{\dnodea}[3][chj]{%
\dnode[#1,label={above:\ulabel{#2}}]{#3}
}

\newcommand{\dnodeanj}[2]{%
\dnodea[ch]{#1}{#2}
}

\newcommand{\dnodenj}[1]{%
\dnode[ch]{#1}
}

\newcommand{\dnodebr}[1]{%
\node[chj,label={below right:\dlabel{#1}}] {};
}

\newcommand{\dnoder}[2][chj]{%
\node[#1,label={right:\dlabel{#2}}] {};
}

\newcommand{\dydots}{%
\node[chj,draw=none,inner sep=1pt] {\dots};
}

\newcommand{\QRightarrow}{%
\begingroup
\tikzset{every path/.style={}}%
\tikz \draw (0,3pt) -- ++(1em,0) (0,1pt) -- ++(1em+1pt,0) (0,-1pt) -- ++(1em+1pt,0) (0,-3pt) -- ++(1em,0) (1em-1pt,5pt) to[out=-75,in=135] (1em+2pt,0) to[out=-135,in=75] (1em-1pt,-5pt);
\endgroup
}

\newcommand{\QLeftarrow}{%
\begingroup
\tikz
\draw[shorten >=0pt,shorten <=0pt] (0,3pt) -- ++(-1em,0) (0,1pt) -- ++(-1em-1pt,0) (0,-1pt) -- ++(-1em-1pt,0) (0,-3pt) -- ++(-1em,0) (-1em+1pt,5pt) to[out=-105,in=45] (-1em-2pt,0) to[out=-45,in=105] (-1em+1pt,-5pt);
\endgroup
}

\begin{document}
\begin{align*}
A_l &&& 
\begin{tikzpicture}[start chain]
\dnode{1}
\dnode{2}
\dydots
\dnode{l-1}
\dnode{l}
\end{tikzpicture}
&&
(l+1) \\
%
B_l &&&
\begin{tikzpicture}[start chain]
\dnode{1}
\dnode{2}
\dydots
\dnode{l-1}
\dnodenj{l}
\path (chain-4) -- node[anchor=mid] {\(\Rightarrow\)} (chain-5);
\end{tikzpicture}
&&
(2) \\
%
C_l &&&
\begin{tikzpicture}[start chain]
\dnode{1}
\dnode{2}
\dydots
\dnode{l-1}
\dnodenj{l}
\path (chain-4) -- node[anchor=mid] {\(\Leftarrow\)} (chain-5);
\end{tikzpicture}
&&
(2) \\
%
D_l &&&
\begin{tikzpicture}
\begin{scope}[start chain]
\dnode{1}
\dnode{2}
\node[chj,draw=none] {\dots};
\dnode{l-2}
\dnode{l-1}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-4);
\dnodebr{l}
\end{scope}
\end{tikzpicture}
&&
(4) \\
%
E_6 &&&
\begin{tikzpicture}
\begin{scope}[start chain]
\foreach \dyni in {1,...,5} {
\dnode{\dyni}
}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin (chain-3);
\dnodebr{6}
\end{scope}
\end{tikzpicture}
&&
(3) \\
%
E_7 &&&
\begin{tikzpicture}
\begin{scope}[start chain]
\foreach \dyni in {1,...,6} {
\dnode{\dyni}
}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin (chain-3);
\dnodebr{7}
\end{scope}
\end{tikzpicture}
&&
(2) \\
%
E_8 &&&
\begin{tikzpicture}
\begin{scope}[start chain]
\foreach \dyni in {1,...,7} {
\dnode{\dyni}
}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin (chain-5);
\dnodebr{8}
\end{scope}
\end{tikzpicture}
&&
(1) \\
%
F_4 &&&
\begin{tikzpicture}[start chain]
\dnode{1}
\dnode{2}
\dnodenj{3}
\dnode{4}
\path (chain-2) -- node[anchor=mid] {\(\Rightarrow\)} (chain-3);
\end{tikzpicture}
&&
(1) \\
%
G_2 &&&
\begin{tikzpicture}[start chain]
\dnodenj{1}
\dnodenj{2}
\path (chain-1) -- node {\(\Rrightarrow\)} (chain-2);
\end{tikzpicture}
\end{align*}

\let\dlabel=\mlabel

\begin{align*}
&A_1^{(1)} &&
\begin{tikzpicture}[start chain]
\dnodenj{1}
\dnodenj{1}
\path (chain-1) -- node[anchor=mid] {\(\Longleftrightarrow\)} (chain-2);
\end{tikzpicture}
\\
%
&A_l^{(1)} (l \ge 2) &&
\begin{tikzpicture}[start chain,node distance=1ex and 2em]
\dnode{1}
\dnode{1}
\dydots
\dnode{1}
\dnode{1}
\begin{scope}[start chain=br going above]
\chainin(chain-3);
\node[ch,join=with chain-1,join=with chain-5,label={[inner sep=1pt]10:\(1\)}] {};
\end{scope}
\end{tikzpicture}
\\
%
&B_l^{(1)} (l \ge 3) &&
\begin{tikzpicture}
\begin{scope}[start chain]
\dnode{1}
\dnode{2}
\dnode{2}
\dydots
\dnode{2}
\dnodenj{2}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-2);
\dnodebr{1}
\end{scope}
\path (chain-5) -- node{\(\Rightarrow\)} (chain-6);
\end{tikzpicture}
\\
%
&C_l^{(1)} (l \ge 2) &&
\begin{tikzpicture}[start chain]
\dnodenj{1}
\dnodenj{2}
\dydots
\dnode{2}
\dnodenj{1}
\path (chain-1) -- node{\(\Rightarrow\)} (chain-2);
\path (chain-4) -- node{\(\Leftarrow\)} (chain-5);
\end{tikzpicture}
\\
%
&D_l^{(1)} (l \ge 4) &&
\begin{tikzpicture}
\begin{scope}[start chain]
\dnode{1}
\dnode{2}
\dnode{2}
\dydots
\dnode{2}
\dnode{1}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-2);
\dnodebr{1};
\end{scope}
\begin{scope}[start chain=br2 going above]
\chainin(chain-5);
\dnodebr{1};
\end{scope}
\end{tikzpicture}
\\
%
&G_2^{(1)} &&
\begin{tikzpicture}[start chain]
\dnode{1}
\dnode{2}
\dnodenj{3}
\path (chain-2) -- node{\(\Rrightarrow\)} (chain-3);
\end{tikzpicture}
\\
%
&F_4^{(1)} &&
\begin{tikzpicture}[start chain]
\dnode{1}
\dnode{2}
\dnode{3}
\dnodenj{4}
\dnode{2}
\path (chain-3) -- node[anchor=mid]{\(\Rightarrow\)} (chain-4);
\end{tikzpicture}
\\
%
&E_6^{(1)} &&
\begin{tikzpicture}
\begin{scope}[start chain]
\foreach \dyi in {1,2,3,2,1} {
\dnode{\dyi}
}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-3);
\dnodebr{2}
\dnodebr{1}
\end{scope}
\end{tikzpicture}
\\
%
&E_7^{(1)} &&
\begin{tikzpicture}
\begin{scope}[start chain]
\foreach \dyi in {1,2,3,4,3,2,1} {
\dnode{\dyi}
}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-4);
\dnodebr{2}
\end{scope}
\end{tikzpicture}
\\
%
&E_8^{(1)} &&
\begin{tikzpicture}
\begin{scope}[start chain]
\foreach \dyi in {1,2,3,4,5,6,4,2} {
\dnode{\dyi}
}
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-6);
\dnodebr{3}
\end{scope}
\end{tikzpicture}
\end{align*}

\let\dlabel=\alabel

\begin{align*}
&A_2^{(2)} &&
\begin{tikzpicture}[start chain]
\dnodeanj{2}{0}
\dnodeanj{1}{1}
\path (chain-1) -- node {\QLeftarrow} (chain-2);
\end{tikzpicture}
\\
%
&A_{2l}^{(2)} (l \ge 2) &&
\begin{tikzpicture}[start chain]
\dnodeanj{2}{0}
\dnodeanj{2}{1}
\dydots
\dnodea{2}{l-1}
\dnodea{1}{l}
\path (chain-1) -- node[anchor=mid] {\(\Leftarrow\)} (chain-2);
\end{tikzpicture}
\\
%
&A_{2l-1}^{(2)} (l \ge 3) &&
\begin{tikzpicture}
\begin{scope}[start chain]
\dnodea{1}{1}
\node[chj,label={below:\dlabel{2}},label={[inner sep=1pt]above right:\mlabel{2}}] {};
\dnodea{2}{3}
\dydots
\dnodea{2}{l-1}
\dnodeanj{1}{l}
\path (chain-5) -- node[anchor=mid] {\(\Leftarrow\)} (chain-6);
\end{scope}
\begin{scope}[start chain=br going above]
\chainin(chain-2);
\node[chj,label={below left:\dlabel{0}},label={[inner sep=1pt]above right:\mlabel{1}}] {};
\end{scope}
\end{tikzpicture}
\\
%
&D_{l+1}^{(2)} (l \ge 2) &&
\begin{tikzpicture}[start chain]
\dnodea{1}{1}
\dnodeanj{1}{1}
\dydots
\dnodea{1}{l-1}
\dnodeanj{1}{l}
\path (chain-1) -- node[anchor=mid] {\(\Leftarrow\)} (chain-2);
\path (chain-4) -- node[anchor=mid] {\(\Rightarrow\)} (chain-5);
\end{tikzpicture}
\\
%
&E_6^{(2)} &&
\begin{tikzpicture}[start chain]
\dnodea{1}{0}
\dnodea{2}{1}
\dnodea{3}{2}
\dnodeanj{2}{3}
\dnodea{1}{4}
\path (chain-3) -- node[anchor=mid] {\(\Leftarrow\)} (chain-4);
\end{tikzpicture}
\end{align*}

\begin{align*}
&D_4^{(3)} &&
\begin{tikzpicture}[start chain]
\dnodea{1}{0}
\dnodea{2}{1}
\dnodeanj{1}{2}
\path (chain-2) -- node {\(\Lleftarrow\)} (chain-3);
\end{tikzpicture}
\end{align*}

\end{document}

Produces:

alt text

I'm sure that there are cleaner ways to do this, and optimisations (though, for the record, some of my experiments with the chains library didn't work correctly - indeed, I couldn't get some of the examples in the manual to compile). I tried to get it as close to the book as I could, whilst looking for a slightly more expansive and "cleaner" style (at least, as far as the preview in Google docs goes).

One of these days I'll learn what these diagrams actually mean ...

Packages loaded:

  • geometry: just to get the whole lot on one page
  • amssymb: to get the triple arrows and the left-right double arrow
  • mathtools: to get the mathrlap command as I preferred the labels centred on the \alpha rather than on the whole label.
  • tikz: to do the actual diagram
  • chains: to do the automatic placement of the nodes
share|improve this answer
    
Amazing!!! Thank you very much for the TeX code. Is it OK for me to include them into the paper on this subject? Well I don't know whether and when it ever becomes complete, though. They look beautiful! –  Yuji Nov 15 '10 at 11:28
    
@Yuji: Of course it's okay - everything posted here is available under a Creative Commons license (see foot of page for exact details of what you have to do - if it's not clear, ask a question about it on meta). Not sure I understand what you mean by "complete" though - unless you're referring to the paper. Incidentally, when cut-and-pasting, be ware that my code sets up some global TikZ defaults which - if you have other diagrams - you might want to make local. –  Loop Space Nov 15 '10 at 11:52
    
Yes I referred to the paper. Thanks again! –  Yuji Nov 15 '10 at 12:58

Here's the first page:

\documentclass{article}
\pagestyle{empty}
\usepackage{amssymb}
\usepackage{mathtools}
\begin{document}

\begin{align*}
A_l &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \dotsb - \underset{\mathclap{\alpha_{l-1}}}{\circ} - \underset{\mathclap{\alpha_l}}{\circ} && (l+1) \\
%
B_l &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \dotsb - \underset{\mathclap{\alpha_{l-1}}}{\circ} \Rightarrow \underset{\mathclap{\alpha_l}}{\circ} && (2) \\
%
C_l &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \dotsb - \underset{\mathclap{\alpha_{l-1}}}{\circ} \Leftarrow \underset{\mathclap{\alpha_l}}{\circ} && (2) \\
%
D_l &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \dotsb - \underset{\mathclap{\alpha_{l-2}}}{\overset{\overset{\textstyle\circ_{\mathrlap{\alpha_l}}}{\textstyle\vert}}{\circ}} \,-\, \underset{\mathclap{\alpha_{l-1}}}{\circ} && (4) \\
%
E_6 &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \underset{\mathclap{\alpha_3}}{\overset{\overset{\textstyle\circ_{\mathrlap{\alpha_6}}}{\textstyle\vert}}{\circ}} - \underset{\mathclap{\alpha_4}}{\circ} - \underset{\mathclap{\alpha_5}}{\circ} && (3) \\
%
E_7 &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \underset{\mathclap{\alpha_3}}{\overset{\overset{\textstyle\circ_{\mathrlap{\alpha_7}}}{\textstyle\vert}}{\circ}} - \underset{\mathclap{\alpha_4}}{\circ} - \underset{\mathclap{\alpha_5}}{\circ} - \underset{\mathclap{\alpha_6}}{\circ} && (2) \\
%
E_8 &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} - \underset{\mathclap{\alpha_3}}{\circ} - \underset{\mathclap{\alpha_4}}{\circ} - \underset{\mathclap{\alpha_5}}{\overset{\overset{\textstyle\circ_{\mathrlap{\alpha_8}}}{\textstyle\vert}}{\circ}} - \underset{\mathclap{\alpha_6}}{\circ} - \underset{\mathclap{\alpha_7}}{\circ} && (1) \\
%
F_4 &&& \underset{\mathclap{\alpha_1}}{\circ} - \underset{\mathclap{\alpha_2}}{\circ} \Rightarrow \underset{\mathclap{\alpha_3}}{\circ} - \underset{\mathclap{\alpha_4}}{\circ} && (1) \\
%
G_2 &&& \underset{\mathclap{\alpha_1}}{\circ} \Rrightarrow \underset{\mathclap{\alpha_2}}{\circ} && (1)
\end{align*}
\end{document}

which produces:

alt text

I think that the vertical lines aren't spaced quite right (not central) and the vertical space introduced by the alphas on the higher dots should be removed (but I don't know how to do that).

Using this, you could reproduce all the diagrams except the second in Aff 1, and I'm not sure how to do the quadruple arrow in the first diagram in Aff 2.

However, if I were actually doing these diagrams, I would definitely use TikZ.

share|improve this answer
    
I actually poked at the TikZ side of this, and I still have no idea how to get the quadruple arrow. It's surprisingly tough. –  Antal S-Z Nov 13 '10 at 16:32
    
TikZ doesn't seem to have the capability of double/triple/quadruple arrows, does it? Can they be implemented as new decorations? –  Matthew Leingang Nov 13 '10 at 16:32
    
Apart from the not entirely correct spacing of the vertical lines, they are too long in comparison to the horizontal ones. –  Pieter Nov 13 '10 at 16:40
    
@Pieter: did I claim it was perfect? Seriously, changing the \textstyle to \scriptstyle ameliorates the size a little. –  Loop Space Nov 13 '10 at 16:48
    
Unicode defines ⭆ U+2B46 RIGHTWARDS QUADRUPLE ARROW, so [insert usual text about unicode-math] @Matthew: double arrows: \tikz[double equal sign distance] \draw[double,thick,-implies](0,0.55ex) --++(3ex,0); (see p.161 of the 2.10 manual) –  Caramdir Nov 13 '10 at 16:59

A first try, but I'm not capable of typesetting the quadruple arrow (as there is no symbol) or two nodes above each other. First I've defined a \node{}{} command ease of notation:

\newcommand\node[2]{\overset{#1}{\underset{#2}{\circ}}}

which then can be used as

\node{1}{a_0}-\node{2}{a_1}\Lleftarrow\node{1}{a_2}
\node{1}{a_0}\Leftarrow\node{1}{a_1}-\cdots-\node{1}{a_{l-1}}\Rightarrow\node{1}{a_l}

resulting in

The rendering of two Dynkin diagrams

Is this what you're looking for? If so, with some hacking it should be possible to get a quadruple arrow and a way to place nodes above each other. Maybe a matrix of math nodes in TikZ could be used for this, you try to emulate math spacing with minimal margins and you should be ready to go (if you want me to create a minimal example, I'll add one later). If I knew a way to draw a quadruple arrow :).

share|improve this answer
    
Thank you too! It's very nice and simple for linear diagrams. –  Yuji Nov 14 '10 at 1:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.