summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-18 21:46:02 +0000
committerKarl Berry <karl@freefriends.org>2017-11-18 21:46:02 +0000
commitba6f6ac5705667b8a0d7d3ddcb50a275d06278a1 (patch)
tree3aa4f40ac2adb0053b3e32e9b14958cef33b6c0a
parent9746eec6f52784c17ea0fdd0c1d47e8deb9ca0f8 (diff)
dynkin-diagrams (18nov17)
git-svn-id: svn://tug.org/texlive/trunk@45846 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/README4
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.bib212
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdfbin153870 -> 233754 bytes
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex667
-rw-r--r--Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty1728
5 files changed, 2220 insertions, 391 deletions
diff --git a/Master/texmf-dist/doc/latex/dynkin-diagrams/README b/Master/texmf-dist/doc/latex/dynkin-diagrams/README
index 0a9ec82779f..26cba041b7c 100644
--- a/Master/texmf-dist/doc/latex/dynkin-diagrams/README
+++ b/Master/texmf-dist/doc/latex/dynkin-diagrams/README
@@ -2,9 +2,9 @@ ___________________________________
Dynkin diagrams
- v1.0
+ v2.0
- 8 September 2017
+ 18 November 2017
___________________________________
Authors : Ben McKay
diff --git a/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.bib b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.bib
new file mode 100644
index 00000000000..a72cb1dade1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.bib
@@ -0,0 +1,212 @@
+% This file was created with JabRef 2.10b2.
+% Encoding: ISO8859_1
+
+
+@Book{Bourbaki:2002,
+ Title = {Lie groups and {L}ie algebras. {C}hapters 4--6},
+ Author = {Bourbaki, Nicolas},
+ Publisher = {Springer-Verlag, Berlin},
+ Year = {2002},
+ Note = {Translated from the 1968 French original by Andrew Pressley},
+ Series = {Elements of Mathematics (Berlin)},
+
+ ISBN = {3-540-42650-7},
+ Mrclass = {17-01 (00A05 20E42 20F55 22-01)},
+ Mrnumber = {1890629},
+ Owner = {user},
+ Pages = {xii+300},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1007/978-3-540-89394-3}
+}
+
+@Book{Carter:2005,
+ Title = {Lie algebras of finite and affine type},
+ Author = {Carter, R. W.},
+ Publisher = {Cambridge University Press, Cambridge},
+ Year = {2005},
+ Series = {Cambridge Studies in Advanced Mathematics},
+ Volume = {96},
+
+ ISBN = {978-0-521-85138-1; 0-521-85138-6},
+ Mrclass = {17-02 (17B67)},
+ Mrnumber = {2188930},
+ Mrreviewer = {Stephen Slebarski},
+ Owner = {user},
+ Pages = {xviii+632},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1017/CBO9780511614910}
+}
+
+@Book{Dynkin:2000,
+ Title = {Selected papers of {E}. {B}. {D}ynkin with commentary},
+ Author = {Dynkin, E. B.},
+ Publisher = {American Mathematical Society, Providence, RI; International Press, Cambridge, MA},
+ Year = {2000},
+ Note = {Edited by A. A. Yushkevich, G. M. Seitz and A. L. Onishchik},
+
+ ISBN = {0-8218-1065-0},
+ Mrclass = {01A75 (60Jxx)},
+ Mrnumber = {1757976},
+ Mrreviewer = {William M. McGovern},
+ Owner = {user},
+ Pages = {xxviii+796},
+ Timestamp = {2017.11.15}
+}
+
+@Article{Dynkin:1952,
+ Title = {Semisimple subalgebras of semisimple {L}ie algebras},
+ Author = {Dynkin, E. B.},
+ Journal = {Mat. Sbornik N.S.},
+ Year = {1952},
+ Note = {Reprinted in English translation in \cite{Dynkin:2000}.},
+ Pages = {349--462 (3 plates)},
+ Volume = {30(72)},
+
+ Mrclass = {09.1X},
+ Mrnumber = {0047629},
+ Mrreviewer = {I. Kaplansky},
+ Owner = {user},
+ Timestamp = {2017.11.15}
+}
+
+@Book{Grove/Benson:1985,
+ Title = {Finite reflection groups},
+ Author = {Grove, L. C. and Benson, C. T.},
+ Publisher = {Springer-Verlag, New York},
+ Year = {1985},
+ Edition = {Second},
+ Series = {Graduate Texts in Mathematics},
+ Volume = {99},
+
+ ISBN = {0-387-96082-1},
+ Mrclass = {20-01 (20B25 20H15)},
+ Mrnumber = {777684},
+ Owner = {user},
+ Pages = {x+133},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1007/978-1-4757-1869-0}
+}
+
+@Book{Helgason:2001,
+ Title = {Differential geometry, {L}ie groups, and symmetric spaces},
+ Author = {Helgason, Sigurdur},
+ Publisher = {American Mathematical Society, Providence, RI},
+ Year = {2001},
+ Note = {Corrected reprint of the 1978 original},
+ Series = {Graduate Studies in Mathematics},
+ Volume = {34},
+
+ ISBN = {0-8218-2848-7},
+ Mrclass = {53C35 (22E10 22E46 22E60)},
+ Mrnumber = {1834454},
+ Owner = {user},
+ Pages = {xxvi+641},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1090/gsm/034}
+}
+
+@Book{Humphreys:1990,
+ Title = {Reflection groups and {C}oxeter groups},
+ Author = {Humphreys, James E.},
+ Publisher = {Cambridge University Press, Cambridge},
+ Year = {1990},
+ Series = {Cambridge Studies in Advanced Mathematics},
+ Volume = {29},
+
+ ISBN = {0-521-37510-X},
+ Mrclass = {20-02 (20F32 20F55 20G15 20H15)},
+ Mrnumber = {1066460},
+ Mrreviewer = {Louis Solomon},
+ Owner = {user},
+ Pages = {xii+204},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1017/CBO9780511623646}
+}
+
+@Book{Kac:1990,
+ Title = {Infinite-dimensional {L}ie algebras},
+ Author = {Kac, Victor G.},
+ Publisher = {Cambridge University Press, Cambridge},
+ Year = {1990},
+ Edition = {Third},
+
+ ISBN = {0-521-37215-1; 0-521-46693-8},
+ Mrclass = {17B65 (17B67 17B68 58F07)},
+ Mrnumber = {1104219},
+ Owner = {user},
+ Pages = {xxii+400},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1017/CBO9780511626234}
+}
+
+@Book{OnishchikVinberg:1990,
+ Title = {Lie groups and algebraic groups},
+ Author = {Onishchik, A. L. and Vinberg, {\`E}. B.},
+ Publisher = {Springer-Verlag},
+ Year = {1990},
+
+ Address = {Berlin},
+ Note = {Translated from the Russian and with a preface by D. A. Leites},
+ Series = {Springer Series in Soviet Mathematics},
+
+ ISBN = {3-540-50614-4},
+ Mrclass = {22-01 (17B20 20G20 22E10 22E15)},
+ Mrnumber = {91g:22001},
+ Mrreviewer = {James E. Humphreys},
+ Owner = {user},
+ Pages = {xx+328},
+ Timestamp = {2017.11.15}
+}
+
+@Book{Onishchik/Vinberg:1990,
+ Title = {Lie groups and algebraic groups},
+ Author = {Onishchik, A. L. and Vinberg, \`E. B.},
+ Publisher = {Springer-Verlag, Berlin},
+ Year = {1990},
+ Note = {Translated from the Russian and with a preface by D. A. Leites},
+ Series = {Springer Series in Soviet Mathematics},
+
+ ISBN = {3-540-50614-4},
+ Mrclass = {22-01 (17B20 20G20 22E10 22E15)},
+ Mrnumber = {1064110},
+ Mrreviewer = {James E. Humphreys},
+ Owner = {user},
+ Pages = {xx+328},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1007/978-3-642-74334-4}
+}
+
+@Book{Satake:1980,
+ Title = {Algebraic structures of symmetric domains},
+ Author = {Satake, Ichir\^o},
+ Publisher = {Iwanami Shoten, Tokyo; Princeton University Press, Princeton, N.J.},
+ Year = {1980},
+ Series = {Kan\^o Memorial Lectures},
+ Volume = {4},
+
+ Mrclass = {32-02 (17C35 32Mxx 53C35)},
+ Mrnumber = {591460},
+ Mrreviewer = {S. Murakami},
+ Owner = {user},
+ Pages = {xvi+321},
+ Timestamp = {2017.11.15}
+}
+
+@Book{Vinberg:1994,
+ Title = {Lie groups and {L}ie algebras, {III}},
+ Editor = {Vinberg, \`E. B.},
+ Publisher = {Springer-Verlag, Berlin},
+ Year = {1994},
+ Note = {Structure of Lie groups and Lie algebras, A translation of {{\i}t Current problems in mathematics. Fundamental directions. Vol. 41} (Russian), Akad. Nauk SSSR, Vsesoyuz. Inst. Nauchn. i Tekhn. Inform., Moscow, 1990 [ MR1056485 (91b:22001)], Translation by V. Minachin [V. V. Minakhin], Translation edited by A. L. Onishchik and \`E. B. Vinberg},
+ Series = {Encyclopaedia of Mathematical Sciences},
+ Volume = {41},
+
+ ISBN = {3-540-54683-9},
+ Mrclass = {22-06 (17-06 22Exx)},
+ Mrnumber = {1349140},
+ Owner = {user},
+ Pages = {iv+248},
+ Timestamp = {2017.11.15},
+ Url = {https://doi.org/10.1007/978-3-662-03066-0}
+}
+
diff --git a/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdf b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdf
index fa4ed5acbe9..851c6ae2200 100644
--- a/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdf
+++ b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex
index 7bc9eb0a18d..f6566c0be0e 100644
--- a/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex
+++ b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex
@@ -3,124 +3,197 @@
\title{The Dynkin diagrams package}
\author{Ben McKay}
\date{\today}
-
-\usepackage{dynkin-diagrams}
+
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{array}
\usepackage{xstring}
-\usepackage{etoolbox}
+\usepackage{etoolbox}
+\usepackage{longtable}
+\usepackage{showexpl}
+\usepackage{booktabs}
+\usepackage{dynkin-diagrams}
\usetikzlibrary{backgrounds}
\usetikzlibrary{decorations.markings}
-\usepackage{longtable}
-\usepackage{showexpl}
\newcommand{\C}[1]{\mathbb{C}^{#1}}
-
-
\renewcommand*{\arraystretch}{1.5}
+\renewcommand\ResultBox{\fcolorbox{gray!50}{gray!30}}
+
\begin{document}
+
\maketitle
\tableofcontents
-\section{Quick introduction}
+\section{Quick introduction}
This is a test of the Dynkin diagram package.
Load the package via
\begin{verbatim}
-\usepackage{dynkin-diagrams}
+\usepackage{dynkin-diagrams}
\end{verbatim}
-and invoke it directly:
+(see below for options) and invoke it directly:
+
\begin{LTXexample}
The flag variety of pointed lines in
projective 3-space is associated to
-the Dykin diagram \dynk[parabolic=3]{A}{3}.
+the Dynkin diagram \dynkin[parabolic=3]{A}{3}.
\end{LTXexample}
-or use the long form inside a \verb!\tikz! statement or environment:
+
+or use the long form inside a \verb!\tikz! statement:
\begin{LTXexample}
\tikz \dynkin[parabolic=3]{A}{3};
\end{LTXexample}
+
+or a TikZ environment:
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[parabolic=3,label]{A}{3}
+\end{tikzpicture}
+\end{LTXexample}
With labels for the roots:
\begin{LTXexample}
-\tikz \dynkin[parabolic=3,label=true]{A}{3};
+\dynkin[parabolic=3,label]{A}{3}
\end{LTXexample}
-
-\bigskip
-
-Inside an environment:
+\newpage\noindent%
+Make up your own labels for the roots:
\begin{LTXexample}
\begin{tikzpicture}
-\dynkin[parabolic=3,label=true]{A}{3}
+\dynkin[parabolic=3]{A}{3}
+\rootlabel{2}{\alpha_2}
\end{tikzpicture}
\end{LTXexample}
-
-\bigskip
-
-Make up your own labels for the roots:
-
+Use any text scale you like:
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[parabolic=3,textscale=1.2]{A}{3};
+\rootlabel{2}{\alpha_2}
+\end{tikzpicture}
+\end{LTXexample}
+and access root labels via TikZ:
\begin{LTXexample}
\begin{tikzpicture}
\dynkin[parabolic=3]{A}{3};
-\node at (root label 2) {\scalebox{.7}{\(\alpha_2\)}};
+\node at (root label 2) {\(\alpha_2\)};
\end{tikzpicture}
\end{LTXexample}
-
-\newpage
-
-Drawing curves between the roots:
-
+The labels have default locations:
\begin{LTXexample}
\begin{tikzpicture}
-\dynkin[parabolic=429]{E}{8}
-\draw[brown,-latex]
- (root 3.south)
- to [out=-90, in=-90]
- (root 6.south);
+\dynkin{E}{8};
+\rootlabel{1}{\alpha_1}
+\rootlabel{2}{\alpha_2}
+\rootlabel{3}{\alpha_3}
\end{tikzpicture}
\end{LTXexample}
-
-Various options:
-
+You can use a starred form to flip labels to alternate locations:
\begin{LTXexample}
-\tikz \dynkin[color=brown]{G}{2};
+\begin{tikzpicture}
+\dynkin{E}{8};
+\rootlabel*{1}{\alpha_1}
+\rootlabel*{2}{\alpha_2}
+\rootlabel*{3}{\alpha_3}
+\end{tikzpicture}
\end{LTXexample}
-
+TikZ can access the roots themselves:
+\typeout{AAAAAAA}
\begin{LTXexample}
-\tikz \dynkin[edgelength=1.2,parabolic=3]{A}{3};
+\begin{tikzpicture}
+\dynkin{A}{4};
+\fill[white,draw=black] (root 2) circle (.1cm);
+\draw[black] (root 2) circle (.05cm);
+\end{tikzpicture}
\end{LTXexample}
-
+Some diagrams will have double edges:
\begin{LTXexample}
-\tikz \dynkin[crosssize=.1cm,parabolic=3]{A}{3};
+\dynkin{F}{4}
\end{LTXexample}
-
+or triple edges:
\begin{LTXexample}
-\tikz \dynkin[dotradius=.08cm,parabolic=3]{A}{3};
+\dynkin{G}{2}
\end{LTXexample}
-
+\newpage\noindent%
+Draw curves between the roots:
\begin{LTXexample}
-\begin{tikzpicture}[
- show background rectangle,
- background rectangle/.style={fill=lightgray}]
-\dynkin[parabolic=1,background color=lightgray]{G}{2}
+\begin{tikzpicture}
+\dynkin[parabolic=429]{E}{8}
+\draw[very thick, black!50,-latex] (root 3.south) to [out=-45, in=-135] (root 6.south);
\end{tikzpicture}
\end{LTXexample}
-
-
-\section{Syntax}
-
-Inside a \verb!\tikz! environment, the syntax is \verb!\dynkin[<options>]{<letter>}{<rank>}! where \verb!<letter>! is \(A,B,C,D,E,F\) or \(G\), the family of root system for the Dynkin diagram, and \verb!<rank>! is an integer representing the rank, or is the symbol \verb!*! to represent an indefinite rank:
-
+Draw dots on the roots:
\begin{LTXexample}
\begin{tikzpicture}
-\dynkin[parabolic=5]{D}{*}
+\dynkin[label]{C}{8}
+\dynkinopendot{3}
+\dynkinopendot{7}
\end{tikzpicture}
\end{LTXexample}
+Colours:
+\begin{LTXexample}
+\dynkin[color=blue!50,backgroundcolor=red!20]{G}{2}
+\end{LTXexample}
+Edge lengths:
+\begin{LTXexample}
+\dynkin[edgelength=1.2,parabolic=3]{A}{3}
+\end{LTXexample}
+Sizes of dots and crosses:
+\begin{LTXexample}
+\dynkin[dotradius=.08cm,parabolic=3]{A}{3}
+\end{LTXexample}
+Edge styles:
+\begin{LTXexample}
+\dynkin[edge=very thick,parabolic=3]{A}{3}
+\end{LTXexample}
+Open circles instead of closed dots:
+\begin{LTXexample}
+\dynkin[open]{E}{8}
+\end{LTXexample}
+Add closed dots to the open circles, at roots in the current ordering:
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[open]{E}{8};
+\dynkincloseddot{5}
+\dynkincloseddot{8}
+\end{tikzpicture}
+\end{LTXexample}
+More colouring:
+\begin{LTXexample}
+\begin{tikzpicture}[show background rectangle,
+ background rectangle/.style={fill=red!10}]
+\dynkin[parabolic=1,backgroundcolor=blue!20]{G}{2}
+\end{tikzpicture}
+\end{LTXexample}
+Cross styles:
+\begin{LTXexample}
+\dynkin[parabolic=124,cross=thin]{E}{8}
+\end{LTXexample}
+\newpage\noindent{}
+Suppress arrows:
+\begin{LTXexample}
+\dynkin[arrows=false]{F}{4}
+\end{LTXexample}
+\begin{LTXexample}
+\dynkin[arrows=false]{G}{2}
+\end{LTXexample}
-Outside a \verb!\tikz! environment, use \verb!\dynk! instead of \verb!\dynkin!.
+\section{Syntax}
+The syntax is \verb!\dynkin[<options>]{<letter>}{<rank>}! where \verb!<letter>! is \(A,B,C,D,E,F\) or \(G\), the family of root system for the Dynkin diagram, and \verb!<rank>! is an integer representing the rank, or is the symbol \verb!*! to represent an indefinite rank:
+\begin{LTXexample}
+\dynkin[edge=thick,edgelength=.5cm]{A}{*}
+\end{LTXexample}
+\begin{LTXexample}
+\dynkin[edge=thick,edgelength=.5cm]{B}{*}
+\end{LTXexample}
+\begin{LTXexample}
+\dynkin[edge=thick,edgelength=.5cm]{C}{*}
+\end{LTXexample}
+\begin{LTXexample}
+\dynkin[edge=thick,edgelength=.5cm]{D}{*}
+\end{LTXexample}
+Outside a TikZ environment, the command builds its own TikZ environment.
-\bigskip
\newcommand*{\typ}[1]{\(\left<\texttt{#1}\right>\)}
\newcommand*{\optionLabel}[3]{%%
@@ -128,37 +201,108 @@ Outside a \verb!\tikz! environment, use \verb!\dynk! instead of \verb!\dynkin!.
}%%
\section{Options}
+\par\noindent{}All \verb!\dynkin! options (except \texttt{affine}, \texttt{folded}, \texttt{label} and \texttt{parabolic} ) can also be passed to the package to force a global default option:
+\par\noindent%
+\begin{verbatim}
+\usepackage[
+ ordering=Kac,
+ color=blue,
+ open,
+ dotradius=.06cm,
+ backgroundcolor=red]
+ {dynkin-diagrams}
+\end{verbatim}
\par\noindent%
\begin{tabular}{p{1cm}p{10cm}}
\optionLabel{parabolic}{\typ{integer}}{0}
& A parabolic subgroup with specified integer, where the integer
is computed as \(n=\sum 2^i a_i\), \(a_i=0\) or \(1\), to say that root \(i\) is crossed, i.e. a noncompact root. \\
\optionLabel{color}{\typ{color name}}{black} \\
-\optionLabel{background color}{\typ{color name}}{white}
+\optionLabel{backgroundcolor}{\typ{color name}}{white}
& This only says what color you have already set for the background rectangle. It is needed precisely for the \(G_2\) root system, to draw the triple line correctly, and only when your background color is not white. \\
-\optionLabel{dotradius}{\typ{number}cm}{.04cm}
-& size of the dots in the Dynkin diagram \\
+\optionLabel{dotradius}{\typ{number}cm}{.05cm}
+& size of the dots and of the crosses in the Dynkin diagram \\
\optionLabel{edgelength}{\typ{number}cm}{.35cm}
& distance between nodes in the Dynkin diagram \\
-\optionLabel{crosssize}{\typ{number}}{1.5}
-& size of the crosses, for parabolic subgroup diagrams. \\
+\optionLabel{edge}{\typ{TikZ style data}}{thin}
+& style of edges in the Dynkin diagram \\
+\optionLabel{open}{\typ{true or false}}{false}
+& use open circles rather than solid dots as default \\
\optionLabel{label}{true or false}{false}
& whether to label the roots by their root numbers. \\
+\optionLabel{arrows}{\typ{true or false}}{true}
+& whether to draw the arrows that arise along the edges. \\
+\optionLabel{folded}{\typ{true or false}}{true}
+& whether, when drawing \(A\), \(D\) or \(E_6\) diagrams, to draw them folded. \\
+\optionLabel{foldarrowstyle}{\typ{TikZ style}}{stealth-stealth}
+& when drawing folded diagrams, style for the fold arrows. \\
+\optionLabel{foldarrowcolor}{\typ{colour}}{black!50}
+& when drawing folded diagrams, colour for the fold arrows. \\
+\optionLabel{Coxeter}{\typ{true or false}}{false}
+& whether to draw a Coxeter diagram, rather than a Dynkin diagram. \\
+
+\optionLabel{ordering}{\typ{Adams, Bourbaki, Carter, Dynkin, Kac}}{Bourbaki}
+& which ordering of the roots to use in exceptional root systems as follows:
\end{tabular}
-%% All other options are passed to tikz.
-\section{Finding the roots}
-The roots are labelled in the Bourbaki labelling, but from \(0\) to \(r-1\), where \(r\) is the rank.
-The command sets up nodes \texttt{(root 0)}, \texttt{(root 1)}, and so on.
-Use these tikz nodes to draw on the Dynkin diagram.
-It also sets up nodes \texttt{(root label 0)}, \texttt{(root label 1)}, and so on for the labels.
+\newpage
+
+\NewDocumentCommand\tablerow{mm}%
+{%
+\(#1_{#2}\)
+&
+\dynkin[label,ordering=Adams]{#1}{#2}
+&
+\dynkin[label]{#1}{#2}
+&
+\dynkin[label,ordering=Carter]{#1}{#2}
+&
+\dynkin[label,ordering=Dynkin]{#1}{#2}
+&
+\dynkin[label,ordering=Kac]{#1}{#2}
+\\
+}%
+
+\begin{center}
+\begin{longtable}{@{}llllll@{}}
+\toprule
+& Adams & Bourbaki & Carter & Dynkin & Kac \\ \midrule
+\endfirsthead
+\toprule
+Adams & Bourbaki & Carter & Dynkin & Kac \\ \midrule
+\endhead
+\bottomrule
+\endfoot
+\bottomrule
+\endlastfoot
+\tablerow{E}{6}
+\tablerow{E}{7}
+\tablerow{E}{8}
+\tablerow{F}{4}
+\tablerow{G}{2}
+\end{longtable}
+\end{center}
+\par\noindent{}All other options are passed to TikZ.
+
+\section{Finding the roots}
+The roots are labelled from \(1\) to \(r\), where \(r\) is the rank.
+The command sets up TikZ nodes \texttt{(root 1)}, \texttt{(root 2)}, and so on.
+Affine extended Dynkin diagrams have affine root are at \texttt{(root 0)}.
+Use these tikz nodes to draw on the Dynkin diagram, as above.
+It also sets up TikZ nodes \texttt{(root label 0)}, \texttt{(root label 1)}, and so on for the labels, and TikZ nodes \texttt{(root label swap 0)}, \texttt{(root label swap 1)}, and so on as alternative label locations, in case you want two labels on the same root, or the default choice doesn't look the way you like.
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin{E}{6};
+\rootlabel{2}{\alpha_2}
+\rootlabel{5}{\alpha_5}
+\end{tikzpicture}
+\end{LTXexample}
\section{Example: some parabolic subgroups}
-\newcommand{\drawparabolic}[3]%%
-{#1_{#2,#3} & \tikz \dynkin[parabolic=#3]{#1}{#2}; \\}
+\newcommand{\drawparabolic}[3]{#1_{#2,#3} & \tikz \dynkin[parabolic=#3]{#1}{#2}; \\}
\begin{center}
\begin{longtable}{@{}>{$}r<{$}m{2cm}m{2cm}@{}}
@@ -167,18 +311,22 @@ It also sets up nodes \texttt{(root label 0)}, \texttt{(root label 1)}, and so o
\endfoot
\endlastfoot
\drawparabolic{A}{1}{0}
-\drawparabolic{A}{1}{1}
+\drawparabolic{A}{1}{2}
\drawparabolic{A}{2}{0}
\drawparabolic{A}{2}{2}
-\drawparabolic{A}{2}{2}
-\drawparabolic{B}{2}{3}
-\drawparabolic{C}{3}{5}
-\drawparabolic{D}{5}{4}
-\drawparabolic{E}{6}{5}
-\drawparabolic{E}{7}{101}
-\drawparabolic{E}{8}{123}
-\drawparabolic{F}{4}{13}
+\drawparabolic{A}{2}{4}
+\drawparabolic{A}{2}{6}
+\drawparabolic{B}{2}{6}
+\drawparabolic{C}{3}{10}
+\drawparabolic{D}{5}{8}
+\drawparabolic{E}{6}{10}
+\drawparabolic{E}{7}{202}
+\drawparabolic{E}{8}{246}
+\drawparabolic{F}{4}{26}
+\drawparabolic{G}{2}{0}
\drawparabolic{G}{2}{2}
+\drawparabolic{G}{2}{4}
+\drawparabolic{G}{2}{6}
\end{longtable}
\end{center}
@@ -188,24 +336,355 @@ It also sets up nodes \texttt{(root label 0)}, \texttt{(root label 1)}, and so o
\renewcommand*{\arraystretch}{1.5}
\begin{center}
-\begin{longtable}{@{}>{$}r<{$}m{2cm}m{5cm}@{}}
+\begin{longtable}{@{}>{$}r<{$}m{2.2cm}m{5cm}@{}}
\endfirsthead
\endhead
\endfoot
\endlastfoot
- A_n &\dynk[parabolic=8]{A}{*}& Grassmannian of $k$-planes in $\C{n+1}$ \\
- B_n &\dynk[parabolic=1]{B}{*}& $(2n-1)$-dimensional hyperquadric, i.e. the variety of null lines in $\C{2n+1}$
- \\
- C_n &\dynk[parabolic=16]{C}{*}& space of Lagrangian $n$-planes in $\C{2n}$
- \\
- D_n &\dynk[parabolic=1]{D}{*}&$(2n-2)$-dimensional hyperquadric, i.e. the variety of null lines in $\C{2n}$
-\\
- D_n&\dynk[parabolic=32]{D}{*}& one component of the variety of maximal dimension null subspaces of $\C{2n}$ \\
- D_n
- &\dynk[parabolic=16]{D}{*}&the other component\\
- E_6&\dynk[parabolic=1]{E}{6}&complexified octave projective plane\\
- E_6&\dynk[parabolic=32]{E}{6}&its dual plane\\
- E_7 &\dynk[parabolic=64]{E}{7}& the space of null octave 3-planes in octave 6-space
+ A_n &
+ \dynkin[parabolic=16]{A}{*} &
+ Grassmannian of $k$-planes in $\C{n+1}$
+ \\
+ B_n &
+ \dynkin[parabolic=2]{B}{*} &
+ $(2n-1)$-dimensional hyperquadric, i.e. the variety of null lines in $\C{2n+1}$
+ \\
+ C_n &
+ \dynkin[parabolic=32]{C}{*} &
+ space of Lagrangian $n$-planes in $\C{2n}$
+ \\
+ D_n &
+ \dynkin[parabolic=2]{D}{*} &
+ $(2n-2)$-dimensional hyperquadric, i.e. the variety of null lines in $\C{2n}$
+ \\
+ D_n &
+ \dynkin[parabolic=64]{D}{*} &
+ one component of the variety of maximal dimension null subspaces of $\C{2n}$ \\
+ D_n &
+ \dynkin[parabolic=32]{D}{*} &
+ the other component\\
+ E_6 &
+ \dynkin[parabolic=2]{E}{6} &
+ complexified octave projective plane\\
+ E_6 &
+ \dynkin[parabolic=64]{E}{6}&its dual plane\\
+ E_7 &
+ \dynkin[parabolic=128]{E}{7}& the space of null octave 3-planes in octave 6-space
\end{longtable}
\end{center}
+
+
+\section{Affine extended Dynkin diagrams}
+
+\begin{LTXexample}
+\dynkin[affine,edge=thick]{A}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[edgelength=1cm,edge=thick,affine]{A}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[scale=1.5,edge=thick,affine]{A}{*}
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[affine,label]{A}{8};
+\end{tikzpicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[affine]{A}{*};
+\node at (root label 0) {\(\alpha_0\)};
+\end{tikzpicture}
+\end{LTXexample}
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[affine]{A}{9}
+\node at (root label 0) {\(\alpha_0\)};
+\end{tikzpicture}
+\end{LTXexample}
+
+You can use TikZ to put in labels:
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[affine]{A}{9};
+\node at (root label 0) {\(\alpha_0\)};
+\node at (root label 1) {\(\alpha_1\)};
+\node at (root label 2) {\(\alpha_2\)};
+\node at (root label 3) {\(\alpha_3\)};
+\end{tikzpicture}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{A}{1}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{B}{8}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{B}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{C}{8}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{C}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{D}{8}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{D}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{E}{6}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{E}{7}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{E}{8}
+\end{LTXexample}
+
+Open circles instead of closed dots:
+\begin{LTXexample}
+\dynkin[affine,open,label]{E}{8}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{F}{4}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[affine,label]{G}{2}
+\end{LTXexample}
+
+
+\section{Coxeter diagrams}
+
+\begin{LTXexample}
+\dynkin[Coxeter]{B}{7}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[Coxeter]{F}{4}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[Coxeter]{G}{2}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[Coxeter]{H}{7}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[Coxeter]{I}{7}
+\end{LTXexample}
+
+
+\section{Folded Dynkin diagrams}
+
+\begin{LTXexample}
+\dynkin[folded]{E}{6}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{E}{6}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded]{A}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{A}{1}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{A}{2}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{A}{3}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{A}{4}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{A}{10}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{A}{11}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label,arrows=false]{A}{11}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded]{D}{*}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{D}{1}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{D}{2}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{D}{3}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{D}{4}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{D}{10}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin[folded,label]{D}{11}
+\end{LTXexample}
+
+
+
+\section{Satake diagrams}
+
+We have incomplete support for Satake diagrams as yet, following the conventions of \cite{Helgason:2001}.
+
+\begin{LTXexample}
+\dynkin{A}{I}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{A}{II}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{I}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{II}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{III}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{IV}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{V}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{VI}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{VII}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{VIII}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{E}{XI}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{F}{I}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{F}{II}
+\end{LTXexample}
+
+\begin{LTXexample}
+\dynkin{G}{I}
+\end{LTXexample}
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[open]{E}{6}
+\draw[\dynkinfoldarrowstyle,\dynkinfoldarrowcolor]
+ (root 1.south) to [out=-45, in=-135] (root 6.south);
+\draw[\dynkinfoldarrowstyle,\dynkinfoldarrowcolor]
+ (root 3.south) to [out=-45, in=-135] (root 5.south);
+\end{tikzpicture}
+\end{LTXexample}
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[open]{E}{6}
+\dynkincloseddot{3}
+\dynkincloseddot{4}
+\dynkincloseddot{5}
+\draw[\dynkinfoldarrowstyle,\dynkinfoldarrowcolor]
+ (root 1.south) to [out=-45, in=-135] (root 6.south);
+\end{tikzpicture}
+\end{LTXexample}
+
+\section{Other stuff}
+
+Some sophisticated diagrams:
+\begin{center}
+\begin{tikzpicture}
+\dynkin[folded]{D}{9}
+\foreach \i in {2,6,8,9} {
+ \dynkinopendot{\i}
+}
+\dynkinline[white]{4}{5}
+\dynkindots{4}{5}
+\dynkinopendot{4}
+\dynkincloseddot{5}
+\end{tikzpicture}
+\end{center}
+can be drawn using sending TikZ options to \verb!\dynkinline! to erase the old edge, \verb!\dynkindots! to make indefinite edges, and then redrawing the roots next to any edge we draw:
+\begin{LTXexample}
+\begin{tikzpicture}[show background rectangle,
+ background rectangle/.style={fill=red!10}]
+\dynkin[folded]{D}{9};
+\foreach \i in {2,6,8,9} {
+ \dynkinopendot{\i}
+}
+\dynkinline[red!10]{4}{5}
+\dynkindots{4}{5}
+\dynkinopendot{4}
+\dynkincloseddot{5}
+\end{tikzpicture}
+\end{LTXexample}
+
+Always draw roots after edges.
+
+\nocite{*}
+\bibliographystyle{amsplain}
+\bibliography{dynkin-diagrams}
\end{document}
diff --git a/Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty b/Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty
index 5626893c931..8ed53464f8f 100644
--- a/Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty
+++ b/Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty
@@ -1,347 +1,1485 @@
+%
+%
+% The Dynkin Diagrams package.
+%
+% Version 2
+%
+%
+% This package draws Dynkin diagrams in LaTeX documents, using the TikZ package.
+% Please see the file dynkin-diagrams.tex for examples of use of this package.
+%
+% Benjamin McKay
+% b.mckay@ucc.ie
+%
+% Released under the LaTeX Project Public License v1.3c or later, see
+% http://www.latex-project.org/lppl.txt
+%
+%
+%
+%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{dynkin-diagrams}[2016/06/28 Dynkin diagrams]
-
+\ProvidesPackage{dynkin-diagrams}[2017/11/14 Dynkin diagrams]
\RequirePackage{tikz}
\RequirePackage{xstring}
+\RequirePackage{xparse}
\RequirePackage{etoolbox}
+\RequirePackage{expl3}
\RequirePackage{pgfkeys}
+\RequirePackage{pgfopts}
\usetikzlibrary{decorations.markings}
-
-\ProcessOptions\relax
-
+\usetikzlibrary{arrows,arrows.meta}
+\usetikzlibrary{calc}
%%
-%% Application programming interface:
+%% Application programming interface:
+%% See dynkin-diagrams.tex file for examples of use.
%%
-\newcommand*{\dynk}[3][]{%%
-\tikz[baseline=-\the\dimexpr\fontdimen22\textfont2\relax ] \dynkin[#1]{#2}{#3};%
-}%%
-
-% See test1.tex file for examples of use.
-
-\newcommand*{\dynkin}[3][]{
-\pgfkeys{/dynkin, default, #1}%
-\IfStrEq{#3}{*}{}{\dynkinrank=#3}
-\IfStrEq{#2}{A}{\Adynkin[\dynkinparabolic]{#3}}{}
-\IfStrEq{#2}{B}{\Bdynkin[\dynkinparabolic]{#3}}{}
-\IfStrEq{#2}{C}{\Cdynkin[\dynkinparabolic]{#3}}{}
-\IfStrEq{#2}{D}{\Ddynkin[\dynkinparabolic]{#3}}{}
-\IfStrEq{#2}{E}{\Edynkin[\dynkinparabolic]{#3}}{}
-\IfStrEq{#2}{F}{\Ffourdynkin[\dynkinparabolic]{#3}}{}
-\IfStrEq{#2}{G}{\Gtwodynkin[\dynkinparabolic]}{}
-\IfStrEq{\dynkinlabeltheroots}{true}{\dynkinprintlabels}{}
-}
+\NewDocumentCommand\dynkin{O{}mm}%
+{%
+ \ifdefined\filldraw%
+ \@dynkin[#1]{#2}{#3}%
+ \else%
+ \tikz[baseline=-\the\dimexpr\fontdimen22\textfont2\relax ]{\@dynkin[#1]{#2}{#3}}%
+ \fi%
+}%
+
+%% \convertRootNumber{<n>}
+%% ->
+%% Converts <n> from Bourbaki ordering to the current ordering, storing the result in a count called \RootNumber.
+\NewDocumentCommand\convertRootNumber{m}%
+{%
+ \IfStrEq{#1}{0}
+ {
+ \global\RootNumber=0
+ }
+ {
+ \IfStrEqCase{\dynkinseries}%
+ {%
+ {E}%
+ {%
+ \ifnum\dynkinrank=6%
+ \IfStrEqCase{\dynkinordering}%
+ {%
+ {Adams}{\RootNumber=\stringcharacterinposition{152436}{#1}}%
+ {Carter}{\RootNumber=\stringcharacterinposition{142356}{#1}}%
+ {Dynkin}{\RootNumber=\stringcharacterinposition{162345}{#1}}%
+ {Kac}{\RootNumber=\stringcharacterinposition{162345}{#1}}%
+ }%
+ [\RootNumber=#1]%
+ \else%
+ \ifnum\dynkinrank=7%
+ \IfStrEqCase{\dynkinordering}%
+ {%
+ {Adams}{\RootNumber=\stringcharacterinposition{6354217}{#1}}%
+ {Carter}{\RootNumber=\stringcharacterinposition{7564321}{#1}}%
+ {Dynkin}{\RootNumber=\stringcharacterinposition{1723456}{#1}}%
+ {Kac}{\RootNumber=\stringcharacterinposition{1723456}{#1}}%
+ }%
+ [\RootNumber=#1]%
+ \else%
+ \ifnum\dynkinrank=8%
+ \IfStrEqCase{\dynkinordering}%
+ {%
+ {Adams}{\RootNumber=\stringcharacterinposition{13245678}{#1}}%
+ {Carter}{\RootNumber=\stringcharacterinposition{86754321}{#1}}%
+ {Dynkin}{\RootNumber=\stringcharacterinposition{18234567}{#1}}%
+ {Kac}{\RootNumber=\stringcharacterinposition{78654321}{#1}}%
+ }%
+ [\RootNumber=#1]%
+ \else%
+ \fi%
+ \fi%
+ \fi%
+ }%
+ {F}%
+ {%
+ \IfStrEqCase{\dynkinordering}%
+ {%
+ {Adams}{\RootNumber=\stringcharacterinposition{4321}{#1}}%
+ }%
+ [\RootNumber=#1]%
+ }%
+ {G}%
+ {%
+ \IfStrEqCase{\dynkinordering}%
+ {%
+ {Carter}{\RootNumber=\stringcharacterinposition{21}{#1}}%
+ {Dynkin}{\RootNumber=\stringcharacterinposition{21}{#1}}%
+ {Kac}{\RootNumber=\stringcharacterinposition{21}{#1}}%
+ }%
+ [\RootNumber=#1]%
+ }%
+ }%
+ [\RootNumber=#1]%
+ }
+}%
+
+\NewDocumentCommand\dynkinprint{m}%
+{%
+ \scalebox{\dynkintextscale}{\(#1\)}%
+}%
+
+%% \rootlabel{<n>}{<s>} or \rootlabel*{<n>}{<s>}
+%% ->
+%% Prints the label string <s> on the Dynkin diagram at root number <n>, in the current ordering convention.
+\NewDocumentCommand\rootlabel{smm}%
+{%
+ \IfBooleanTF{#1}%
+ {\node at (root label swap #2) {\dynkinprint{#3}};}%
+ {\node at (root label #2) {\dynkinprint{#3}};}%
+}%
+
+%% \dynkinprintlabels
+%% ->
+%% Prints the default labels on the Dynkin diagram, in the given ordering.
+\newcommand{\dynkinprintlabels}%
+{%
+ \foreach \i in {1,...,\the\dynkinrank}%
+ {\rootlabel{\i}{\i}}%
+ \ifisaffine\rootlabel{0}{0}\fi%
+}%
+
+%% \dynkincross{<n>}
+%% ->
+%% Prints a cross at root <n> on the current Dynkin diagram.
+%% The starred form accepts <n> in the Bourbaki ordering.
+\NewDocumentCommand\dynkincross{sO{}m}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootNumber{#3}%
+ }%
+ {%
+ \RootNumber=#3%
+ }%
+ \draw[\dynkincrossstyle,\dynkincolor,#2]%
+ ($(root \the\RootNumber)+(\dynkinradius,\dynkinradius)$)%
+ --%
+ ($(root \the\RootNumber)-(\dynkinradius,\dynkinradius)$);%
+ \draw[\dynkincrossstyle,\dynkincolor]%
+ ($(root \the\RootNumber)+(-\dynkinradius,\dynkinradius)$)%
+ --%
+ ($(root \the\RootNumber)+(\dynkinradius,-\dynkinradius)$);%
+}%
+
+%% \dynkinopendot{<n>}
+%% ->
+%% Prints an open dot at root <n> on the current Dynkin diagram.
+%% The starred form accepts <n> in the Bourbaki ordering.
+\NewDocumentCommand\dynkinopendot{sO{}m}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootNumber{#3}%
+ }%
+ {%
+ \RootNumber=#3%
+ }%
+ \fill[\dynkinbackcolor,draw=\dynkincolor,#2] (root \the\RootNumber) circle (\dynkinradius);%
+}%
+%% \dynkincloseddot{<n>}
+%% ->
+%% Prints a closed dot at root <n> on the current Dynkin diagram.
+%% The starred form accepts <n> in the Bourbaki ordering.
+\NewDocumentCommand\dynkincloseddot{sO{}m}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootNumber{#3}%
+ }%
+ {%
+ \RootNumber=#3%
+ }%
+ \fill[\dynkincolor,draw=\dynkincolor,#2] (root \the\RootNumber) circle (\dynkinradius);%
+}%
+
+%% \dynkindot{<n>}
+%% ->
+%% Prints a dot at root <n> on the current Dynkin diagram in the default style.
+%% The starred form accepts <n> in the Bourbaki ordering.
+\NewDocumentCommand\dynkindot{sO{}m}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \ifnum#3=0%
+ \ifdynkinopendots%
+ \dynkincloseddot*[#2]{0}%
+ \else%
+ \dynkinopendot*[#2]{0}%
+ \fi%
+ \else%
+ \ifdynkinopendots%
+ \dynkinopendot*[#2]{#3}%
+ \else%
+ \dynkincloseddot*[#2]{#3}%
+ \fi%
+ \fi%
+ }%
+ {%
+ \ifnum#3=0%
+ \ifdynkinopendots%
+ \dynkincloseddot[#2]{0}%
+ \else%
+ \dynkinopendot[#2]{0}%
+ \fi%
+ \else%
+ \ifdynkinopendots%
+ \dynkinopendot[#2]{#3}%
+ \else%
+ \dynkincloseddot[#2]{#3}%
+ \fi%
+ \fi%
+ }%
+}%
+
+%% \dynkinline{<p>}{<q>}
+%% ->
+%% Draws a single line from root <p> to root <q> on the current Dynkin diagram in the current label ordering.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkinline{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \draw[\dynkincolor,\dynkinedgestyle,#2] ($(root \the\@fromRoot)$) -- ($(root \the\@toRoot)$);%
+}%
+
+%% \dynkinfoldarrow{<p>}{<q>}
+%% ->
+%% Draws an arrow to represent folding from root <p> to root <q> on the current Dynkin diagram in the current label ordering.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkinfoldarrow{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \draw[\dynkinfoldarrowstyle,\dynkinfoldarrowcolor,#2] (root \the\@fromRoot) -- (root \the\@toRoot);%
+}%
+
+%% \dynkindownarc{<p>}{<q>}
+%% ->
+%% Draws a quarter circle from root <p> to root <q> on the current Dynkin diagram in the current label ordering.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkindownarc{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \draw[\dynkincolor,\dynkinedgestyle,#2] ($(root \the\@fromRoot)$) arc (90:0:\dynkinedgelength);%
+}%
+
+%% \dynkinuparc{<p>}{<q>}
+%% ->
+%% Draws a quarter circle from root <p> to root <q> on the current Dynkin diagram in the current label ordering.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkinuparc{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \draw[\dynkincolor,\dynkinedgestyle,#2] ($(root \the\@fromRoot)$) arc (0:-90:\dynkinedgelength);%
+}%
+
+%% \dynkinsemicircle{<p>}{<q>}
+%% ->
+%% Draws a half circle from root <p> to root <q> on the current Dynkin diagram in the current label ordering.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkinsemicircle{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \draw[\dynkincolor,\dynkinedgestyle,#2] ($(root \the\@fromRoot)$) arc (90:-90:\dynkinedgelength);%
+}%
+
+%% \dynkindots{<p>}{s<q>}
+%% ->
+%% Draws a dotted line from root <p> to root <q> on the current Dynkin diagram.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkindots{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \draw[densely dotted,\dynkincolor,#2] ($(root \the\@fromRoot)$) -- ($(root \the\@toRoot)$);%
+}%
+
+%% \dynkindoubleline{<p>}{<q>}
+%% ->
+%% Draws an oriented double line from root <p> to root <q> on the current Dynkin diagram.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkindoubleline{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \ifdynkinarrows%
+ \draw[double,postaction={decorate},\dynkincolor,\dynkinedgestyle,#2]%
+ ($(root \the\@fromRoot)$) -- ($(root \the\@toRoot)$);%
+ \else%
+ \draw[double,\dynkincolor,\dynkinedgestyle,#2]%
+ ($(root \the\@fromRoot)$) -- ($(root \the\@toRoot)$);%
+ \fi%
+}%
+
+%% \dynkintripleline{<p><q>}
+%% ->
+%% Draws an oriented triple line from root <p> to root <q> on the current Dynkin diagram.
+%% The starred form accepts <p> and <q> in the Bourbaki ordering.
+\NewDocumentCommand\dynkintripleline{sO{}mm}%
+{%
+ \IfBooleanTF{#1}%
+ {%
+ \convertRootPair{#3}{#4}%
+ }%
+ {%
+ \@fromRoot=#3%
+ \@toRoot=#4%
+ }%
+ \pgfmathparse{mod(div(\dynkinparabolic,2),2)}%
+ \let\onesbit\pgfmathresult%
+ \pgfmathparse{mod(div(\dynkinparabolic,4),2)}%
+ \let\twosbit\pgfmathresult%
+ \draw[\dynkincolor,fill=\dynkinbackcolor,\dynkinedgestyle,#2] %
+ ($(root \the\@fromRoot)$)%
+ --%
+ +(\onesbit*\dynkinradius,\dynkinradius)%
+ --%
+ ($(root \the\@toRoot)+(-\twosbit*\dynkinradius,\dynkinradius)$)%
+ --%
+ ($(root \the\@toRoot)$)%
+ --%
+ ($(root \the\@toRoot)-(\twosbit*\dynkinradius,\dynkinradius)$)%
+ --%
+ ($(root \the\@fromRoot)+(\onesbit*\dynkinradius,-\dynkinradius)$)%
+ --%
+ cycle;%
+ \ifdynkinarrows%
+ \draw[%
+ \dynkincolor,%
+ \dynkinedgestyle,%
+ -{Classical TikZ Rightarrow[length={3*\dynkinradius}]},%
+ #2%
+ ]%
+ ($(root \the\@toRoot)$) --%
+ ($.65*(root \the\@fromRoot)+.35*(root \the\@toRoot)$);%
+ \fi%
+ \draw[\dynkincolor,#2] ($(root \the\@fromRoot)$) -- ($(root \the\@toRoot)$);%
+}%
%%%
%%% Implementation:
%%%
-\newcount\dynkinrank
-
-\pgfkeys{
- /dynkin/.is family,
- /tikz/decoration={markings,mark=at position 0.7 with {\arrow{>}}},
- /dynkin,
- default/.style = {
- label = false,
- parabolic = 0,
- color = black,
- background color = white,
- dotradius=.04cm,
- edgelength=.35cm,
- crosssize=.07cm
- },
- label/.estore in = \dynkinlabeltheroots,
- parabolic/.estore in = \dynkinparabolic,
- color/.store in =\dynkincolor,
- background color/.store in =\dynkinbackcolor,
- dotradius/.estore in = \dynkinradius,
- edgelength/.estore in = \dykinedgelength,
- crosssize/.estore in = \dynkinXsize,
- .search also={/tikz},
-}
+\def\dynkinseries{A} % Which series of root system: A,B,C,D,E,F,G
+\newcount\dynkinrank % Which rank of root system: 1,2,...
+\newif\ifisaffine % Is this an affine extended root system?
+\newif\iflabeltheroots % Should we label the roots by the current root ordering convention?
+\newif\ifdynkinopendots % Should we draw the roots using open circles or closed dots?
+\newif\ifdynkinarrows % Should we draw arrows on Dynkin diagrams?
+\newif\ifdynkincoxeter % Should we draw Coxeter diagrams?
+\newif\ifdynkinfolded % Should we fold our Dynkin diagrams?
+
+\pgfkeys{%
+ /dynkin/.is family,%
+ /tikz/decoration={markings,mark=at position 0.7 with {\arrow{>}}},%
+ /dynkin,%
+ open/.is if = dynkinopendots,%
+ open=false,%
+ Coxeter/.is if = dynkincoxeter,%
+ Coxeter=false,%
+ arrows/.is if = dynkinarrows,%
+ arrows=true,%
+ dotradius/.estore in = \dynkinradius,%
+ dotradius=.05cm,%
+ color/.store in =\dynkincolor,%
+ backgroundcolor/.store in =\dynkinbackcolor,%
+ color = black,%
+ backgroundcolor = white,%
+ edge/.store in = \dynkinedgestyle,%
+ edge = thin,%
+ cross/.store in = \dynkincrossstyle,%
+ cross = thick,%
+ edgelength/.estore in = \dynkinedgelength,%
+ edgelength = .35cm,%
+ ordering/.store in = \dynkinordering,%
+ ordering = Bourbaki,%
+ textscale/.estore in = \dynkintextscale,%
+ textscale = 0.7,%
+ foldarrowstyle/.estore in = \dynkinfoldarrowstyle,%
+ foldarrowstyle = stealth-stealth,%
+ foldarrowcolor/.estore in = \dynkinfoldarrowcolor,%
+ foldarrowcolor = black!50,%
+ default/.style = {%
+ label/.is if = labeltheroots,%
+ label = false,%
+ parabolic = 0,%
+ affine/.is if = isaffine,%
+ affine = false,%
+ folded/.is if = dynkinfolded,%
+ folded=false,%
+ },%
+ parabolic/.estore in = \dynkinparabolic,%
+ .search also={/tikz},%
+}%
+\ProcessPgfPackageOptions{/dynkin}\relax
-\newcommand{\dynkinprintlabels}
+% *=not a Satake diagram
+% Anything else is the Roman numeral of the diagram, i.e. EVIII diagrams have numeral VIII.
+\gdef\dynkinSatake{*}
+
+\NewDocumentCommand\@dynkin{O{}mm}{%
+ \pgfkeys{/dynkin, default, #1}%
+ \xdef\dynkinseries{#2}%
+ \IfSubStr{ABCDEFGHI}{#2}{}{\errorSeries}%
+ \global\dynkinrank=0%
+ \xdef\dynkinSatake{#3}%
+ \newif\ifwerefolded
+ \ifdynkinfolded
+ \global\werefoldedtrue
+ \else
+ \global\werefoldedfalse
+ \fi
+ \IfInteger{#3}%
+ {%
+ \global\dynkinrank=#3%
+ \gdef\dynkinSatake{*}%
+ }%
+ {%
+ \IfStrEqCase{#2}%
+ {%
+ {A}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {*}{ }%
+ {I}{ }%
+ {II}{}%
+ {III}{}%
+ {IV} {}%
+ }%
+ [\errorRank]%
+ }%
+ {B}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {*}{ }%
+ {I}{}%
+ {II} {}%
+ }%
+ [\errorRank]%
+ }%
+ {C}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {*}{ }%
+ {I}{}%
+ {II} {}%
+ }%
+ [\errorRank]%
+ }%
+ {D}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {*}{ }%
+ {I}{ }%
+ {II} {}%
+ {III}{}%
+ }%
+ [\errorRank]%
+ }%
+ {E}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {I}{ \global\dynkinrank=6}%
+ {II}%
+ {%
+ \global\dynkinfoldedtrue%
+ \global\dynkinrank=6%
+ }%
+ {III}%
+ {%
+ \global\dynkinfoldedtrue%
+ \global\dynkinrank=6%
+ }%
+ {IV}%
+ {%
+ \global\dynkinrank=6%
+ }%
+ {V}%
+ {%
+ \global\dynkinrank=7%
+ }%
+ {VI}%
+ {%
+ \global\dynkinrank=7%
+ }%
+ {VII}%
+ {%
+ \global\dynkinrank=7%
+ }%
+ {VIII}%
+ {%
+ \global\dynkinrank=8%
+ }%
+ {XI}%
+ {%
+ \global\dynkinrank=8%
+ }%
+ }%
+ [\errorRank]%
+ }%
+ {F}%
+ {%
+ \global\dynkinrank=4%
+ \IfStrEqCase{#3}%
+ {%
+ {I}{ }%
+ {II} {}%
+ }%
+ [\errorRank]%
+ }%
+ {G}%
+ {%
+ \global\dynkinrank=2%
+ \IfStrEqCase{#3}%
+ {%
+ {I}{ }%
+ }%
+ [\errorRank]%
+ }%
+ {H}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {*}%
+ {%
+ }%
+ }%
+ [\errorRank]%
+ }%
+ {I}%
+ {%
+ \IfStrEqCase{#3}%
+ {%
+ {*}%
+ {%
+ }%
+ }%
+ [\errorRank]%
+ }%
+ }%
+ [\errorSeries]%
+ }%
+ \checkDynkinDiagram%
+ \ifisaffine%
+ \csname affine#2dynkin\endcsname%
+ \else%
+ \csname#2dynkin\endcsname%
+ \fi%
+ \iflabeltheroots\dynkinprintlabels\fi%
+ \ifwerefolded
+ \global\dynkinfoldedtrue
+ \else
+ \global\dynkinfoldedfalse
+ \fi
+}%
+
+%% \stringcharacterinposition{<s>}{<n>}
+%% -> the element of string <s> in position <n>.
+\ExplSyntaxOn
+\cs_new:Npn \stringcharacterinposition #1 #2
{
-\newcount\rmo
-\rmo=\dynkinrank
-\advance\rmo by -1
-\foreach \i in {0,...,\the\rmo}
+\str_item:fn { #1 } { #2 }
+}
+\cs_generate_variant:Nn \str_item:nn {f}
+\ExplSyntaxOff
+
+\NewDocumentCommand\errorRootOrdering{}
+{%
+ \ClassWarning{Unrecognized root ordering: ``\dynkinordering'' in Dynkin diagram}%
+}%
+
+\NewDocumentCommand\errorRank{}%
+{%
+ \ClassWarning{Unrecognized \dynkinseries{} series rank: ``\the\dynkinrank'' in Dynkin diagram}%
+}%
+
+\NewDocumentCommand\errorSeries{}%
+{%
+ \ClassWarning{Unrecognized series ``\dynkinseries{}'' in Dynkin diagram}%
+}%
+
+%% \checkDynkinDiagram
+%% ->
+%% Raises error messages for erroneous inputs.
+\NewDocumentCommand\checkDynkinDiagram{}%
+{%
+ \IfStrEqCase{\dynkinordering}%
+ {%
+ {Adams}{}%
+ {Bourbaki}{}%
+ {Carter}{}%
+ {Dynkin}{}%
+ {Kac}{}%
+ }%
+ [\ClassWarning{Unrecognized label ordering: ``\dynkinordering'' in Dynkin diagram}]%
+ \IfStrEqCase{\dynkinseries}%
+ {%
+ {A}{}%
+ {B}{}%
+ {C}{}%
+ {D}{}%
+ {E}%
+ {%
+ \ifnum\dynkinrank=6%
+ \else%
+ \ifnum\dynkinrank=7%
+ \else%
+ \ifnum\dynkinrank=8%
+ \else%
+ \errorRank%
+ \fi%
+ \fi%
+ \fi%
+ }%
+ {F}%
+ {%
+ \ifnum\dynkinrank=4%
+ \else%
+ \errorRank%
+ \fi%
+ }%
+ {G}%
+ {%
+ \ifnum\dynkinrank=2%
+ \else%
+ \errorRank%
+ \fi%
+ }%
+ {H}{}%
+ {I}{}%
+ }%
+ [\errorSeries]%
+}%
+
+% We store the number of a root, converted to the current root ordering convention, here.
+\newcount\RootNumber
+
+% A slight headache: all of the routines that draw Dynkin diagrams are written
+% in Bourbaki ordering. We store the roots in the current ordering.
+% So when we draw edges, we need to convert from the Bourbaki ordering each time.
+% We store the conversions here.
+\newcount\@fromRoot
+\newcount\@toRoot
+
+%% \convertRootPair{<p>}{<q>}
+%% ->
+%% Stores conversions in \@fromRoot and \@toRoot.
+\NewDocumentCommand\convertRootPair{mm}
+{%
+ \convertRootNumber{#1}%
+ \@fromRoot=\RootNumber%
+ \convertRootNumber{#2}%
+ \@toRoot=\RootNumber%
+}%
+
+%% \testbit{<n>}{<b>}{<f>}{<g>}
+%% If bit number <b> of <n> is 1 then expand <f> else expand <g>.
+\newcommand*{\testbit}[4]%
+{%
+ \pgfmathparse{int(mod(div(#1,2^(#2)),2))}%
+ \let\tf\pgfmathresult%
+ \IfStrEq{\tf}{1}{#3}{#4}%
+}%
+
+%% \placeRoot{<n>}{<x>}{<y>}
+%% ->
+%% Tell TikZ where to place node <n> (in Bourbaki ordering) for a root of a Dynkin diagram. Draws nothing.
+%% Starred form swaps label positions.
+\NewDocumentCommand\placeRoot{smmm}%
+{%
+ \convertRootNumber{#2}%
+ \node (root \the\RootNumber) at ({(#3)*\dynkinedgelength},{(#4)*\dynkinedgelength}) {};%
+ \IfBooleanTF{#1}%
+ {%
+ \node[above] (root label \the\RootNumber)%
+ at ({(#3)*\dynkinedgelength},{((#4)*\dynkinedgelength)+2*\dynkinradius}) {};%
+ \node[below] (root label swap \the\RootNumber)%
+ at ({(#3)*\dynkinedgelength},{((#4)*\dynkinedgelength)-2*\dynkinradius}) {};%
+ }%
+ {%
+ \node[above] (root label swap \the\RootNumber)%
+ at ({(#3)*\dynkinedgelength},{((#4)*\dynkinedgelength)+2*\dynkinradius}) {};%
+ \node[below] (root label \the\RootNumber)%
+ at ({(#3)*\dynkinedgelength},{((#4)*\dynkinedgelength)-2*\dynkinradius}) {};%
+ }%
+}%
+
+%% \placeRootHorizontalLabels{<n>}{<x>}{<y>}
+%% ->
+%% Tell TikZ where to place node <n> (in Bourbaki ordering) for a root of a Dynkin diagram. Draws nothing.
+%% Places labels to the left or right of the root.
+%% Starred form swaps label positions.
+\NewDocumentCommand\placeRootHorizontalLabels{smmm}%
+{%
+ \convertRootNumber{#2}%
+ \node (root \the\RootNumber) at ({(#3)*\dynkinedgelength},{(#4)*\dynkinedgelength}) {};%
+ \IfBooleanTF{#1}%
+ {%
+ \node[left] (root label \the\RootNumber)%
+ at ({((#3)*\dynkinedgelength)-\dynkinradius},{(#4)*\dynkinedgelength}) {};%
+ \node[right] (root label swap \the\RootNumber)%
+ at ({((#3)*\dynkinedgelength)+\dynkinradius},{(#4)*\dynkinedgelength}) {};%
+ }%
+ {%
+ \node[left] (root label swap \the\RootNumber)%
+ at ({((#3)*\dynkinedgelength)-\dynkinradius},{(#4)*\dynkinedgelength}) {};%
+ \node[right] (root label \the\RootNumber)%
+ at ({((#3)*\dynkinedgelength)+\dynkinradius},{(#4)*\dynkinedgelength}) {};%
+ }%
+}%
+
+%% \Adynkinnodes
+%% ->
+%% Tell TikZ where to place the nodes for an A series Dynkin diagram. Draws nothing.
+\newcommand*{\Adynkinnodes}%
+{%
+ \ifdynkinfolded%
+ \newcount\halfrank%
+ \halfrank=\dynkinrank%
+ \divide\halfrank by 2%
+ \newcount\countdown%
+ \countdown=\dynkinrank%
+ \ifodd\dynkinrank%
+ \foreach \b in {1,...,\the\halfrank}%
+ {%
+ \placeRoot*{\b}{\b}{1}%
+ \placeRoot{\the\countdown}{\b}{-1}%
+ \ifdynkinarrows%
+ \ifnum\dynkinrank>1%
+ \dynkinfoldarrow*{\b}{\the\countdown}%
+ \fi%
+ \fi%
+ \global\advance\countdown by -1%
+ }%
+ \advance\halfrank by 1%
+ \placeRootHorizontalLabels{\the\halfrank}{\the\halfrank}{0}%
+ \else%
+ \foreach \b in {1,...,\the\halfrank}%
+ {%
+ \placeRoot*{\b}{\b}{1}%
+ \placeRoot{\the\countdown}{\b}{-1}%
+ \ifdynkinarrows%
+ \dynkinfoldarrow*{\b}{\the\countdown} %
+ \fi%
+ \global\advance\countdown by -1%
+ }%
+ \fi%
+ \else%
+ \foreach \b in {1,...,\the\dynkinrank}%
+ {%
+ \placeRoot{\b}{\b}{0}%
+ }%
+ \fi%
+}%
+
+%% \Adynkin
+%% ->
+%% Draws an A series Dynkin diagram.
+\newcommand*{\Adynkin}
{
-\node at (root label \i) {\scalebox{0.5}{\(\i\)}};
+ \newif\ifwasfolded
+ \ifdynkinfolded
+ \global\wasfoldedtrue
+ \else
+ \global\wasfoldedfalse
+ \fi
+ \ifnum\dynkinrank=0%
+ \global\dynkinrank=7%
+ % Create the nodes.
+ \Adynkinnodes%
+ % Draw the edges.
+ \dynkinline*{1}{2}%
+ \dynkindots*{2}{3}%
+ \ifdynkinfolded%
+ \dynkindownarc*{3}{4}%
+ \dynkinuparc*{4}{5}%
+ \else%
+ \dynkinline*{3}{4}%
+ \dynkinline*{4}{5}%
+ \fi%
+ \dynkindots*{5}{6}%
+ \dynkinline*{6}{7}%
+ \else%
+ \ifnum\dynkinrank=1%
+ \global\dynkinfoldedfalse%
+ \fi%
+ % Create the nodes.
+ \Adynkinnodes%
+ % Draw the edges.
+ \ifnum\dynkinrank>1%
+ \ifnum\dynkinrank=2%
+ \ifdynkinfolded%
+ \dynkinsemicircle*{1}{2}%
+ \else%
+ \dynkinline*{1}{2}%
+ \fi%
+ \else%
+ \newcount\bpo%
+ \bpo=2%
+ \newcount\drmo%
+ \drmo=\dynkinrank%
+ \advance \drmo by -1%
+ \ifdynkinfolded%
+ \newcount\halfrank%
+ \halfrank=\dynkinrank%
+ \divide\halfrank by 2%
+ \newcount\hrmo%
+ \hrmo=\halfrank%
+ \advance\hrmo by -1%
+ \ifnum\halfrank>1%
+ \foreach \b in {1,...,\the\hrmo}%
+ {%
+ \dynkinline*{\b}{\bpo}%
+ \global\advance\bpo by 1%
+ }%
+ \fi%
+ \newcount\hrpo%
+ \hrpo=\halfrank%
+ \advance\hrpo by 1%
+ \ifodd\dynkinrank%
+ \newcount\hrpt%
+ \hrpt=\hrpo%
+ \advance\hrpt by 1%
+ \dynkindownarc*{\the\halfrank}{\the\hrpo}%
+ \dynkinuparc*{\the\hrpo}{\the\hrpt}%
+ \ifdynkinarrows%
+ \dynkinfoldarrow*{\the\halfrank}{\the\hrpt}%
+ \fi%
+ \global\advance\bpo by 2%
+ \ifnum\hrpt<\dynkinrank%
+ \foreach \b in {\the\hrpt,...,\the\drmo}%
+ {%
+ \dynkinline*{\b}{\bpo}%
+ \global\advance\bpo by 1%
+ }%
+ \fi%
+ \else%
+ \dynkinsemicircle*{\the\halfrank}{\the\hrpo}%
+ \global\advance\bpo by 1%
+ \ifnum\halfrank<\drmo%
+ \foreach \b in {\the\hrpo,...,\the\drmo}%
+ {%
+ \dynkinline*{\b}{\bpo}%
+ \global\advance\bpo by 1%
+ }%
+ \fi%
+ \fi%
+ \else%
+ \foreach \b in {1,...,\the\drmo}%
+ {%
+ \dynkinline*{\b}{\bpo}%
+ \global\advance\bpo by 1%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \ifisaffine%
+ \dynkinline*{0}{1}%
+ \dynkinline*{0}{\the\dynkinrank}%
+ \dynkindot*{0}%
+ \fi%
+ % Draw the nodes.
+ \IfStrEqCase{\dynkinSatake}%
+ {%
+ {*}%
+ {%
+ \foreach \b in {1,...,\the\dynkinrank}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}%
+ }%
+ }%
+ {I}%
+ {%
+ \ifisaffine%
+ \dynkinline*{0}{1}%
+ \dynkinline*{0}{\the\dynkinrank}%
+ \dynkindot*{0}%
+ \fi%
+ \foreach \b in {1,...,\the\dynkinrank}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ }%
+ }%
+ {II}%
+ {%
+ \newcount\bb%
+ \bb=1%
+ \foreach \b in {1,...,\the\dynkinrank}%
+ {%
+ \ifodd\bb%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkincloseddot{\b}}%
+ \else%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ \fi%
+ \global\advance \bb by 1%
+ }%
+ }%
+ }%
+ \ifwasfolded
+ \global\dynkinfoldedtrue
+ \else
+ \global\dynkinfoldedfalse
+ \fi
}
+
+%% \Bdynkin
+%% ->
+%% Draw a B series Dynkin diagram.
+\newcommand*{\Bdynkin}
+{
+ \ifdynkincoxeter
+ \Adynkin
+ \convertRootPair{1}{2}
+ \node[above] at ($.5*(root \the\@fromRoot)+.5*(root \the\@toRoot)$) {\dynkinprint{4}};
+ \else
+ \ifnum\dynkinrank=0
+ \dynkinrank=5
+ % Create the nodes.
+ \Adynkinnodes
+ % Draw the edges.
+ \dynkinline*{1}{2}
+ \dynkindots*{2}{3}
+ \dynkinline*{3}{4}
+ \dynkindoubleline*{4}{5}
+ \else
+ % Create the nodes.
+ \Adynkinnodes
+ % Draw the edges.
+ \dynkinline*{1}{\the\dynkinrank}%
+ \newcount\rmo
+ \rmo=\dynkinrank
+ \advance \rmo by -1
+ \dynkindoubleline*{\the\rmo}{\the\dynkinrank}
+ \fi
+ % Draw the nodes.
+ \ifisaffine
+ \dynkinline*{0}{2}
+ \dynkindot*{0}
+ \fi
+ \foreach \b in {1,...,\the\dynkinrank}
+ {
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}
+ }
+ \fi
}
+%% \Cdynkin
+%% ->
+%% Draws a C series Dynkin diagram.
+\newcommand*{\Cdynkin}
+{
+ \ifdynkincoxeter
+ \Bdynkin
+ \else
+ \ifnum\dynkinrank=0
+ \dynkinrank=5
+ % Create the nodes.
+ \Adynkinnodes
+ % Draw the edges.
+ \dynkinline*{1}{2}
+ \dynkindots*{2}{3}
+ \dynkinline*{3}{4}
+ \dynkindoubleline*{5}{4}
+ \else
+ % Create the nodes.
+ \Adynkinnodes
+ % Draw the edges.
+ \newcount\rmo
+ \rmo=\dynkinrank
+ \advance\rmo by -1
+ \dynkinline*{1}{\the\rmo}%
+ \dynkindoubleline*{\the\dynkinrank}{\the\rmo}
+ \fi
+ % Draw the nodes.
+ \ifisaffine
+ \dynkindoubleline*{0}{1}
+ \dynkindot*{0}
+ \fi
+ \foreach \b in {1,...,\the\dynkinrank}
+ {
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}
+ }
+ \fi
+}
-\newcommand{\dynkincross}[2]{
-\dynkindot{#1}{#2}
-\draw[thick,\dynkincolor] ({#1*\dykinedgelength},{#2*\dykinedgelength}) -- ++ ({(1/sqrt(2))*\dynkinXsize},{(1/sqrt(2))*\dynkinXsize});
-\draw[thick,\dynkincolor] ({#1*\dykinedgelength},{#2*\dykinedgelength}) -- ++ ({-(1/sqrt(2))*\dynkinXsize},{(1/sqrt(2))*\dynkinXsize});
-\draw[thick,\dynkincolor] ({#1*\dykinedgelength},{#2*\dykinedgelength}) -- ++ ({(1/sqrt(2))*\dynkinXsize},{-(1/sqrt(2))*\dynkinXsize});
-\draw[thick,\dynkincolor] ({#1*\dykinedgelength},{#2*\dykinedgelength}) -- ++ ({-(1/sqrt(2))*\dynkinXsize},{-(1/sqrt(2))*\dynkinXsize});
+%% \Ddynkinnodes
+%% ->
+%% Tell TikZ where to place the nodes for a D series Dynkin diagram. Draws nothing.
+\newcommand*{\Ddynkinnodes}
+{
+ \newcount\rmo
+ \rmo=\dynkinrank
+ \advance \rmo by -1
+ \newcount\rmt
+ \rmt=\rmo
+ \advance\rmt by -1
+ % Create the nodes.
+ \foreach \b in {1,...,\the\rmt}
+ {
+ \placeRoot{\b}{\b}{0}
+ }
+ \pgfmathparse{subtract(\the\rmo,.5)}
+ \let\rmh\pgfmathresult
+ \ifdynkinfolded
+ \placeRoot{\the\rmo}{\rmh}{-.9}
+ \placeRoot*{\the\dynkinrank}{\rmh}{.9}
+ \else
+ \placeRootHorizontalLabels{\the\rmo}{\rmh}{-.9}
+ \placeRootHorizontalLabels{\the\dynkinrank}{\rmh}{.9}
+ \fi
}
-\newcommand{\dynkindot}[2]{%
-\fill[\dynkincolor] (\dykinedgelength*#1,\dykinedgelength*#2) circle (\dynkinradius);%
+%% \Ddynkin
+%% ->
+%% Draws a D series Dynkin diagram.
+\newcommand*{\Ddynkin}%
+{
+ \ifnum\dynkinrank=1
+ \gdef\dynkinseries{A}
+ \Adynkin
+ \else
+ \ifnum\dynkinrank=0
+ \dynkinrank=6
+ \Ddynkinnodes
+ % Draw the edges.
+ \dynkinline*{1}{2}
+ \dynkindots*{2}{3}
+ \dynkinline*{3}{4}
+ \dynkinline*{4}{5}
+ \dynkinline*{4}{6}
+ \else
+ \Ddynkinnodes
+ % Draw the edges.
+ \dynkinline*{1}{\the\rmt}
+ \dynkinline*{\the\rmt}{\the\rmo}
+ \dynkinline*{\the\rmt}{\the\dynkinrank}
+ \fi
+ \ifdynkinfolded
+ \ifdynkinarrows
+ \draw[\dynkinfoldarrowstyle,\dynkinfoldarrowcolor]
+ (root \the\rmo.east)
+ to [out=45, in=-45]
+ (root \the\dynkinrank.east);
+ \fi
+ \fi
+ % Draw the nodes.
+ \ifisaffine
+ \dynkinline*{0}{2}
+ \dynkindot*{0}
+ \fi
+ \foreach \b in {1,...,\the\dynkinrank}
+ {
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}
+ }
+ \fi
}
-% Line between nodes.
-\newcommand{\dynkinline}[4]{\draw[thin,\dynkincolor] (\dykinedgelength*#1,\dykinedgelength*#2) -- (\dykinedgelength*#3,\dykinedgelength*#4);}
+%% \Edynkinunfolded
+%% ->
+%% Draws an E series Dynkin diagram not folded.
+\newcommand*{\Edynkinunfolded}%
+{
+ % Create the nodes.
+ \placeRoot{1}{1}{0}
+ \ifisaffine
+ \ifnum\dynkinrank=6
+ \placeRootHorizontalLabels{2}{3}{1}
+ \else
+ \placeRoot*{2}{3}{1}
+ \fi
+ \else
+ \placeRoot*{2}{3}{1}
+ \fi
+ \foreach \b in {3,...,\dynkinrank}
+ {
+ \newcount\bmo
+ \bmo=\b
+ \advance\bmo by -1
+ \placeRoot{\b}{\the\bmo}{0}
+ }
+% % Draw the edges.
+ \dynkinline*{1}{\the\dynkinrank}
+ \dynkinline*{2}{4}
+}
-% Dotted line between nodes.
-\newcommand{\dynkindots}[4]{\draw[densely dotted,\dynkincolor] (\dykinedgelength*#1,\dykinedgelength*#2) -- (\dykinedgelength*#3,\dykinedgelength*#4);}
-% Double line between nodes.
-\newcommand{\dynkindoubleline}[4]{\draw[double,postaction={decorate},\dynkincolor] (\dykinedgelength*#1,\dykinedgelength*#2) -- (\dykinedgelength*#3,\dykinedgelength*#4);}
+%% \Edynkinfolded
+%% ->
+%% Draws a folded E6 Dynkin diagram.
+\newcommand*{\Edynkinfolded}%
+{
+ \placeRoot*{1}{0}{1}
+ \placeRoot*{3}{1}{1}
+ \placeRootHorizontalLabels*{4}{2}{0}
+ \placeRootHorizontalLabels{2}{3}{0}
+ \placeRoot{5}{1}{-1}
+ \placeRoot{6}{0}{-1}
+ \dynkinline*{1}{3}
+ \dynkinline*{2}{4}
+ \dynkinline*{5}{6}
+ \dynkindownarc*{3}{4}
+ \dynkinuparc*{4}{5}
+}
-% Triple line between nodes.
-\newcommand{\dynkintripleline}[4]{
-\draw[triple={[line width=.1mm,\dynkincolor] in
- [line width=.6mm,\dynkinbackcolor] in
- [line width=.8mm,\dynkincolor]}] (\dykinedgelength*#3,\dykinedgelength*#4) -- (\dykinedgelength*#1,\dykinedgelength*#2);
-\draw[postaction={decorate},double,\dynkincolor] ({0.401*\dykinedgelength*#3+0.599*\dykinedgelength*#1},\dykinedgelength*#4) -- ({0.399*\dykinedgelength*#3+0.601*\dykinedgelength*#1},\dykinedgelength*#2);
+%% \Edynkin
+%% ->
+%% Draws an E6 Dynkin diagram.
+\newcommand*{\Edynkin}%
+{
+ \ifdynkinfolded
+ \ifnum\dynkinrank=6
+ \Edynkinfolded
+ \else
+ \ClassWarning{Can not fold a diagram of type \dynkinseries\the\dynkinrank.}
+ \fi
+ \else
+ \Edynkinunfolded
+ \fi
+ % Draw the nodes.
+ \ifisaffine
+ \ifnum\dynkinrank=6
+ \dynkinline*{0}{2}
+ \else
+ \dynkinline*{0}{1}
+ \fi
+ \dynkindot{0}
+ \fi
+ \IfStrEqCase{\dynkinSatake}%
+ {%
+ {*}%
+ {%
+ \foreach \b in {1,...,\the\dynkinrank}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}%
+ }%
+ \ifdynkinfolded
+ \ifdynkinarrows
+ \dynkinfoldarrow*{1}{6}
+ \dynkinfoldarrow*{3}{5}
+ \fi
+ \fi
+ }%
+ {I}%
+ {%
+ \foreach \b in {1,...,6}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ }%
+ }%
+ {II}%
+ {%
+ \ifdynkinarrows
+ \dynkinfoldarrow*{1}{6}%
+ \dynkinfoldarrow*{3}{5}%
+ \fi
+ \foreach \b in {1,...,6}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ }%
+ }%
+ {III}%
+ {%
+ \dynkinfoldarrow*{1}{6}%
+ \foreach \b in {1,2,6}%
+ {%
+ \dynkinopendot*{\b}%
+ }%
+ \foreach \b in {3,4,5}%
+ {%
+ \dynkincloseddot*{\b}%
+ }%
+ }%
+ {IV}%
+ {%
+ \foreach \b in {1,6}%
+ {%
+ \dynkinopendot*{\b}%
+ }%
+ \foreach \b in {2,3,4,5}%
+ {%
+ \dynkincloseddot*{\b}%
+ }%
+ }%
+ {V}%
+ {%
+ \foreach \b in {1,...,7}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ }%
+ }%
+ {VI}%
+ {%
+ \foreach \b in {1,3,4,6}%
+ {%
+ \dynkinopendot*{\b}%
+ }%
+ \foreach \b in {2,5,7}%
+ {%
+ \dynkincloseddot*{\b}%
+ }%
+ }%
+ {VII}%
+ {%
+ \foreach \b in {1,6,7}%
+ {%
+ \dynkinopendot*{\b}%
+ }%
+ \foreach \b in {2,3,4,5}%
+ {%
+ \dynkincloseddot*{\b}%
+ }%
+ }%
+ {VIII}%
+ {%
+ \foreach \b in {1,...,8}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ }%
+ }%
+ {XI}%
+ {%
+ \foreach \b in {1,6,7,8}%
+ {%
+ \dynkinopendot*{\b}%
+ }%
+ \foreach \b in {2,3,4,5}%
+ {%
+ \dynkincloseddot*{\b}%
+ }%
+ }%
+ }%
}
-\tikzset{
- triple/.style args={[#1] in [#2] in [#3]}{
- #1,preaction={preaction={draw,#3},draw,#2}
- }
-}
-\newcommand*{\testbit}[4]%
-% if bit number #2 of #1 is 1 then expand #3 else expand #4.
-{%
-\pgfmathparse{mod(div(#1,2^(#2)),2)}%
-\let\tf\pgfmathresult%
-\IfStrEq{\tf}{1.0}{#3}{#4}%
-}%%
-
-
-\newcommand*{\Adynkin}[2][0]%
-%\Adynkin[p]{n} gives the Dynkin diagram of An with parabolic subgroup p.
-%\Adynkin[p]{*} allows for an indefinite choice of n, but then the possible parabolics are only from 0 to 2^7.
-{%%
-\IfStrEq{#2}{*}%
-{%%
- \dynkinrank=7
- \dynkinline{0}{0}{1}{0};
- \dynkindots{1}{0}{2}{0};
- \dynkinline{2}{0}{4}{0};
- \dynkindots{4}{0}{5}{0};
- \dynkinline{5}{0}{6}{0};
- \foreach \b in {0,...,6}%%%
- {%%%
- \testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
- \node (root \b) at ({\b*\dykinedgelength},0) {};
- \node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
- \node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
- }%%%
-}%%
-{%%
-% \draw[\dykinbackcolor] (0,{-\dykinedgelength}) rectangle ({#2*\dykinedgelength},{\dykinedgelength});
- \newcount\rmo
- \rmo=#2
- \advance\rmo by -1
- \dynkinline{0}{0}{\the\rmo}{0};%
- \foreach \b in {0,...,\the\rmo}%%%
- {%%%
- \testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
- \node (root \b) at ({\b*\dykinedgelength},0) {};
- \node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
- \node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
- }%%%
+%% \Fdynkin
+%% ->
+%% Draws an F series Dynkin diagram.
+\newcommand*{\Fdynkin}%
+{
+ \Adynkinnodes
+ \ifdynkincoxeter
+ \dynkinline*{1}{4}
+ \convertRootPair{2}{3}
+ \node[above] at ($.5*(root \the\@fromRoot)+.5*(root \the\@toRoot)$) {\dynkinprint{4}};
+ \foreach \b in {1,...,4}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}%
+ }%
+ \else
+ \dynkinline*{1}{2}
+ \dynkinline*{3}{4}
+ \dynkindoubleline*{2}{3}
+ \ifisaffine
+ \dynkinline*{0}{1}
+ \dynkindot{0}
+ \fi
+ \IfStrEqCase{\dynkinSatake}
+ {%
+ {*}%
+ {%
+ \foreach \b in {1,...,4}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}%
+ }%
+ }%
+ {I}%
+ {%
+ \foreach \b in {1,...,4}%
+ {%
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkinopendot{\b}}%
+ }%
+ }%
+ {II}%
+ {%
+ \dynkincloseddot*{1}%
+ \dynkincloseddot*{2}%
+ \dynkincloseddot*{3}%
+ \dynkinopendot*{4}%
+ }%
+ }%
+ \fi
}
-}%%
+%% \Gdynkin
+%% ->
+%% Draws a G series Dynkin diagram.
+\newcommand*{\Gdynkin}%
+{
+ \newif\ifwasopen
+ \ifdynkinopendots
+ \global\wasopentrue
+ \else
+ \global\wasopenfalse
+ \fi
+ \Adynkinnodes
+ \ifisaffine
+ \dynkinline*{0}{2}
+ \fi
+ \ifdynkincoxeter
+ \convertRootPair{1}{2}
+ \node[above] at ($.5*(root \the\@fromRoot)+.5*(root \the\@toRoot)$) {\dynkinprint{6}};
+ \dynkinline*{1}{2}
+ \else
+ \dynkintripleline*{1}{2}
+ \IfStrEq{\dynkinSatake}{I}{\global\dynkinopendotstrue}{}
+ \ifisaffine
+ \dynkindot{0}
+ \fi
+ \fi
+ \foreach \b in {1,...,2}
+ {
+ \testbit{\dynkinparabolic}{\b}{\dynkincross{\b}}{\dynkindot{\b}}
+ }
+ \ifwasopen
+ \global\dynkinopendotstrue
+ \else
+ \global\dynkinopendotsfalse
+ \fi
+}
-\newcommand*{\Bdynkin}[2][0]%
-%\Bdynkin[p]{n} gives the Dynkin diagram of Bn with parabolic subgroup p.
-%\Bdynkin[p]{*} allows for an indefinite choice of n, but then the possible parabolics are only from 0 to 2^5.
-{%
-\IfStrEq{#2}{*}%
-{%%
- \dynkinrank=5
- \dynkinline{0}{0}{1}{0};
- \dynkindots{1}{0}{2}{0};
- \dynkinline{2}{0}{3}{0};
- \dynkindoubleline{3}{0}{4}{0};
- \foreach \b in {0,...,4}%%%
- {%%%
- \testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
- \node (root \b) at ({\b*\dykinedgelength},0) {};
- \node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
- \node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
- }%%%
-}%%
-{%%
-\pgfmathparse{subtract(#2,1)}%
-\let\rmo\pgfmathresult%
-\pgfmathparse{subtract(\rmo,1)}%
-\let\rmt\pgfmathresult%
-\dynkinline{0}{0}{\rmo}{0};%
-\dynkindoubleline{\rmt}{0}{\rmo}{0};
-\foreach \b in {0,...,\rmo}%%%
-{%%%
-\testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
-\node (root \b) at ({\b*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
-\node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
-}%%%
-}%%
-}%
+%% \Hdynkin
+%% ->
+%% Draws an H series Coxeter diagram.
+\newcommand*{\Hdynkin}%
+{
+ \newcount\Hn
+ \Hn=\dynkinrank
+ \dynkinrank=2
+ \Adynkin
+ \convertRootPair{1}{2}
+ \node[above] at ($.5*(root \the\@fromRoot)+.5*(root \the\@toRoot)$) {\dynkinprint{\the\Hn}};
+}
-\newcommand*{\Cdynkin}[2][0]%
-%\Cdynkin[p]{n} gives the Dynkin diagram of Cn with parabolic subgroup p.
-%\Cdynkin[p]{*} allows for an indefinite choice of n, but then the possible parabolics are only from 0 to 2^5.
-{%%
-\IfStrEq{#2}{*}%
-{%%
- \dynkinrank=5
- \dynkinline{0}{0}{1}{0};
- \dynkindots{1}{0}{2}{0};
- \dynkinline{2}{0}{3}{0};
- \dynkindoubleline{4}{0}{3}{0};
- \foreach \b in {0,...,4}%%%
- {%%%
- \testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
- \node (root \b) at ({\b*\dykinedgelength},0) {};
- \node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
- \node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
- }%%%
-}%%
-{%%
-\pgfmathparse{subtract(#2,1)}%
-\let\rmo\pgfmathresult%
-\pgfmathparse{subtract(\rmo,1)}%
-\let\rmt\pgfmathresult%
-\dynkinline{0}{0}{\rmo}{0};%
-\dynkindoubleline{\rmo}{0}{\rmt}{0};
-\foreach \b in {0,...,\rmo}%%%
-{%%%
-\testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
-\node (root \b) at ({\b*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
-\node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
-}%%%
-}%%
-}%
+%% \Idynkin
+%% ->
+%% Draws an I series Coxeter diagram.
+\newcommand*{\Idynkin}%
+{
+ \Adynkin
+ \convertRootPair{1}{2}
+ \node[above] at ($.5*(root \the\@fromRoot)+.5*(root \the\@toRoot)$) {\dynkinprint{5}};
+}
+\newcommand*{\affineAdynkin}%
+{
+\ifnum\dynkinrank=0
+ \placeRoot*{0}{4}{1}
+ \Adynkin
+\else
+ \ifnum\dynkinrank=1
+ \placeRoot{0}{0}{0}
+ \placeRoot{1}{2}{0}
+ \convertRootNumber{1}
+ \draw[
+ double,
+ \dynkincolor,
+ {Classical TikZ Rightarrow[length={3*\dynkinradius}]}-{Classical TikZ Rightarrow[length={3*\dynkinradius}]}
+ ]
+ ($(root 0)+(\dynkinradius,0)$) -- ($(root \the\RootNumber)-(\dynkinradius,0)$);
+ \else
+ \pgfmathparse{(.5+.5*\the\dynkinrank)}%
+ \let\halfway\pgfmathresult%
+ \placeRoot*{0}{\halfway}{1}
+ \Adynkin
+ \fi
+\fi
+}
-\newcommand*{\Ddynkin}[2][0]%
-%\Ddynkin[p]{n} gives the Dynkin diagram of Dn with parabolic subgroup p.
-%\Ddynkin[p]{*} allows for an indefinite choice of n, but then the possible parabolics are only from 0 to 2^6.
-{%%
-\IfStrEq{#2}{*}%
-{%%
- \dynkinrank=6
- \foreach \x in {0,...,3}
- {
- \dynkindot{\x}{0}
- }
- \dynkinline{0}{0}{1}{0}
- \dynkindots{1}{0}{2}{0}
- \dynkinline{2}{0}{3}{0}
- \dynkinline{3}{0}{3.5}{.9}
- \dynkinline{3}{0}{3.5}{-.9}
-\foreach \b in {0,...,3}%%%
-{%%%
-\testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
-\node (root \b) at ({\b*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
-}%%%
-\testbit{#1}{4}{\dynkincross{3.5}{-.9}}{\dynkindot{3.5}{-.9}}
-\node (root 4) at ({3.5*\dykinedgelength},{-.9*\dykinedgelength}) {};
-\node[below] (root label 4) at ({3.5*\dykinedgelength},{-.9*\dykinedgelength}) {};
-\testbit{#1}{5}{\dynkincross{3.5}{.9}}{\dynkindot{3.5}{.9}}
-\node (root 5) at ({3.5*\dykinedgelength},{.9*\dykinedgelength}) {};
-\node[above] (root label 5) at ({3.5*\dykinedgelength},{.9*\dykinedgelength}) {};
-}%%
-{%%
-\newcount\rmo
-\rmo=#2
-\advance\rmo by -1
-\newcount\rmt
-\rmt=\rmo
-\advance\rmt by -1
-\newcount\rmtt
-\rmtt=\rmt
-\advance\rmtt by -1
-\dynkinline{0}{0}{\the\rmtt}{0};%
-\pgfmathparse{subtract(\the\rmt,.5)}
-\let\rmh\pgfmathresult%
-\dynkinline{\the\rmtt}{0}{\rmh}{.9}
-\dynkinline{\the\rmtt}{0}{\rmh}{-.9}
-\foreach \b in {0,...,\the\rmtt}%%%
-{%%%
-\testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
-\node (root \b) at ({\b*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
-}%%%
-\testbit{#1}{\the\rmt}{\dynkincross{\rmh}{-.9}}{\dynkindot{\rmh}{-.9}}
-\node (root \the\rmt) at ({\rmh*\dykinedgelength},{-.9*\dykinedgelength}) {};
-\node[below] (root label \the\rmt) at ({\rmh*\dykinedgelength},{-.9*\dykinedgelength}) {};
-\testbit{#1}{\the\rmo}{\dynkincross{\rmh}{.9}}{\dynkindot{\rmh}{.9}}
-\node (root \the\rmo) at ({\rmh*\dykinedgelength},{.9*\dykinedgelength}) {};
-\node[above] (root label \the\rmo) at ({\rmh*\dykinedgelength},{.9*\dykinedgelength}) {};
-}%%
-}%
+\newcommand*{\affineBdynkin}%
+{
+ \placeRoot*{0}{2}{1}
+ \Bdynkin
+}
-\newcommand*{\Edynkin}[2][0]%
-%\Edynkin[p]{n} gives the Dynkin diagram of En, n=6,7,8, with parabolic subgroup p.
+\newcommand*{\affineCdynkin}
{
-\pgfmathparse{subtract(#2,1)}%
-\let\rmo\pgfmathresult%
-\pgfmathparse{subtract(\rmo,1)}%
-\let\rmt\pgfmathresult%
-\dynkinline{0}{0}{\rmt}{0};%
-\dynkinline{2}{0}{2}{1}
-\testbit{#1}{0}{\dynkincross{0}{0}}{\dynkindot{0}{0}}
-\node (root 0) at (0,0) {};
-\node[below] (root label 0) at (0,0) {};
-\testbit{#1}{1}{\dynkincross{2}{1}}{\dynkindot{2}{1}}
-\node (root 1) at ({2*\dykinedgelength},{1*\dykinedgelength}) {};
-\node[above] (root label 1) at ({2*\dykinedgelength},{1*\dykinedgelength}) {};
-\foreach \b in {2,...,\rmo}%%%
-{%%%
-\pgfmathparse{subtract(\b,1)}%
-\let\bmo\pgfmathresult%
-\testbit{#1}{\b}{\dynkincross{\bmo}{0}}{\dynkindot{\bmo}{0}}
-\node (root \b) at ({\bmo*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\bmo*\dykinedgelength},0) {};
-}%%%
+ \placeRoot{0}{0}{0}
+ \Cdynkin
}
+\newcommand*{\affineDdynkin}
+{
+ \placeRoot*{0}{2}{1}
+ \Ddynkin
+}
-\newcommand*{\Ffourdynkin}[1][0]%
-%\Fdynkin[p]{n} gives the Dynkin diagram of F4 with parabolic subgroup p.
+\newcommand*{\affineEdynkin}
{
-\dynkinline{0}{0}{3}{0};%
-\dynkindoubleline{1}{0}{2}{0}
-\foreach \b in {0,...,3}%%%
-{%%%
-\testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
-\node (root \b) at ({\b*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
-\node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
-}%%%
+ \ifnum\dynkinrank=6
+ \placeRoot*{0}{3}{2}
+ \Edynkin
+ \else
+ \placeRoot{0}{0}{0}
+ \Edynkin
+ \fi
}
-\newcommand*{\Gtwodynkin}[1][0]%
-%\Gtwodynkin[p] gives the Dynkin diagram of G2 with parabolic subgroup p.
-{%%
-\dynkintripleline{0}{0}{1}{0};%
-\foreach \b in {0,...,1}%%%
-{%%%
-\testbit{#1}{\b}{\dynkincross{\b}{0}}{\dynkindot{\b}{0}}
-\node (root \b) at ({\b*\dykinedgelength},0) {};
-\node[below] (root label \b) at ({\b*\dykinedgelength},0) {};
-\node[above] (root label swap \b) at ({\b*\dykinedgelength},0) {};
-}%%%
-}%%
+\newcommand*{\affineFdynkin}
+{
+ \placeRoot{0}{0}{0}
+ \Fdynkin
+}
+\newcommand*{\affineGdynkin}
+{
+ \placeRoot{0}{3}{0}
+ \Gdynkin
+}
\endinput