summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-13 22:04:42 +0000
committerKarl Berry <karl@freefriends.org>2017-09-13 22:04:42 +0000
commite8c20bb0877f0c49076ba2768b4cc359d973ed58 (patch)
tree126468f9f8be7c3b95774ad08f9612fca1eb47e5 /Master/texmf-dist
parente93b2d183454ff002d8526083f8706347afd28cc (diff)
dynkin-diagrams (14sep17)
git-svn-id: svn://tug.org/texlive/trunk@45287 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/README19
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdfbin0 -> 153870 bytes
-rw-r--r--Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex211
-rw-r--r--Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty347
4 files changed, 577 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/dynkin-diagrams/README b/Master/texmf-dist/doc/latex/dynkin-diagrams/README
new file mode 100644
index 00000000000..0a9ec82779f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/dynkin-diagrams/README
@@ -0,0 +1,19 @@
+___________________________________
+
+ Dynkin diagrams
+
+ v1.0
+
+ 8 September 2017
+___________________________________
+
+Authors : Ben McKay
+Maintainer: Ben McKay
+E-mail : b.mckay@ucc.ie
+Licence : Released under the LaTeX Project Public License v1.3c or
+ later, see http://www.latex-project.org/lppl.txt
+
+----------------------------------------------------------------------
+
+Provides Dynkin diagrams drawn in TikZ.
+
diff --git a/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdf b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.pdf
new file mode 100644
index 00000000000..fa4ed5acbe9
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..7bc9eb0a18d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/dynkin-diagrams/dynkin-diagrams.tex
@@ -0,0 +1,211 @@
+\documentclass{amsart}
+
+\title{The Dynkin diagrams package}
+\author{Ben McKay}
+\date{\today}
+
+\usepackage{dynkin-diagrams}
+\usepackage{amsmath}
+\usepackage{amsfonts}
+\usepackage{array}
+\usepackage{xstring}
+\usepackage{etoolbox}
+\usetikzlibrary{backgrounds}
+\usetikzlibrary{decorations.markings}
+\usepackage{longtable}
+\usepackage{showexpl}
+
+\newcommand{\C}[1]{\mathbb{C}^{#1}}
+
+
+\renewcommand*{\arraystretch}{1.5}
+
+\begin{document}
+\maketitle
+\tableofcontents
+
+\section{Quick introduction}
+
+This is a test of the Dynkin diagram package.
+Load the package via
+\begin{verbatim}
+\usepackage{dynkin-diagrams}
+\end{verbatim}
+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}.
+\end{LTXexample}
+or use the long form inside a \verb!\tikz! statement or environment:
+\begin{LTXexample}
+\tikz \dynkin[parabolic=3]{A}{3};
+\end{LTXexample}
+With labels for the roots:
+\begin{LTXexample}
+\tikz \dynkin[parabolic=3,label=true]{A}{3};
+\end{LTXexample}
+
+\bigskip
+
+Inside an environment:
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[parabolic=3,label=true]{A}{3}
+\end{tikzpicture}
+\end{LTXexample}
+
+\bigskip
+
+Make up your own labels for the roots:
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[parabolic=3]{A}{3};
+\node at (root label 2) {\scalebox{.7}{\(\alpha_2\)}};
+\end{tikzpicture}
+\end{LTXexample}
+
+\newpage
+
+Drawing curves between the roots:
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[parabolic=429]{E}{8}
+\draw[brown,-latex]
+ (root 3.south)
+ to [out=-90, in=-90]
+ (root 6.south);
+\end{tikzpicture}
+\end{LTXexample}
+
+Various options:
+
+\begin{LTXexample}
+\tikz \dynkin[color=brown]{G}{2};
+\end{LTXexample}
+
+\begin{LTXexample}
+\tikz \dynkin[edgelength=1.2,parabolic=3]{A}{3};
+\end{LTXexample}
+
+\begin{LTXexample}
+\tikz \dynkin[crosssize=.1cm,parabolic=3]{A}{3};
+\end{LTXexample}
+
+\begin{LTXexample}
+\tikz \dynkin[dotradius=.08cm,parabolic=3]{A}{3};
+\end{LTXexample}
+
+\begin{LTXexample}
+\begin{tikzpicture}[
+ show background rectangle,
+ background rectangle/.style={fill=lightgray}]
+\dynkin[parabolic=1,background color=lightgray]{G}{2}
+\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:
+
+\begin{LTXexample}
+\begin{tikzpicture}
+\dynkin[parabolic=5]{D}{*}
+\end{tikzpicture}
+\end{LTXexample}
+
+Outside a \verb!\tikz! environment, use \verb!\dynk! instead of \verb!\dynkin!.
+
+
+\bigskip
+
+\newcommand*{\typ}[1]{\(\left<\texttt{#1}\right>\)}
+\newcommand*{\optionLabel}[3]{%%
+\multicolumn{2}{l}{\(\texttt{#1}=\texttt{#2}, \texttt{default}=\texttt{#3}\)} \\
+}%%
+
+\section{Options}
+\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}
+& 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{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{label}{true or false}{false}
+& whether to label the roots by their root numbers. \\
+\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.
+
+
+
+\section{Example: some parabolic subgroups}
+
+\newcommand{\drawparabolic}[3]%%
+{#1_{#2,#3} & \tikz \dynkin[parabolic=#3]{#1}{#2}; \\}
+
+\begin{center}
+\begin{longtable}{@{}>{$}r<{$}m{2cm}m{2cm}@{}}
+\endfirsthead
+\endhead
+\endfoot
+\endlastfoot
+\drawparabolic{A}{1}{0}
+\drawparabolic{A}{1}{1}
+\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{G}{2}{2}
+\end{longtable}
+\end{center}
+
+
+
+\section{Example: the Hermitian symmetric spaces}
+
+ \renewcommand*{\arraystretch}{1.5}
+\begin{center}
+\begin{longtable}{@{}>{$}r<{$}m{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
+\end{longtable}
+\end{center}
+\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
new file mode 100644
index 00000000000..5626893c931
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/dynkin-diagrams/dynkin-diagrams.sty
@@ -0,0 +1,347 @@
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{dynkin-diagrams}[2016/06/28 Dynkin diagrams]
+
+\RequirePackage{tikz}
+\RequirePackage{xstring}
+\RequirePackage{etoolbox}
+\RequirePackage{pgfkeys}
+\usetikzlibrary{decorations.markings}
+
+\ProcessOptions\relax
+
+
+%%
+%% Application programming interface:
+%%
+
+\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}{}
+}
+
+
+
+%%%
+%%% 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},
+}
+
+
+\newcommand{\dynkinprintlabels}
+{
+\newcount\rmo
+\rmo=\dynkinrank
+\advance\rmo by -1
+\foreach \i in {0,...,\the\rmo}
+{
+\node at (root label \i) {\scalebox{0.5}{\(\i\)}};
+}
+}
+
+
+\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});
+}
+
+\newcommand{\dynkindot}[2]{%
+\fill[\dynkincolor] (\dykinedgelength*#1,\dykinedgelength*#2) circle (\dynkinradius);%
+}
+
+% Line between nodes.
+\newcommand{\dynkinline}[4]{\draw[thin,\dynkincolor] (\dykinedgelength*#1,\dykinedgelength*#2) -- (\dykinedgelength*#3,\dykinedgelength*#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);}
+
+% 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);
+}
+\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) {};
+ }%%%
+}
+}%%
+
+
+\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) {};
+}%%%
+}%%
+}%
+
+\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) {};
+}%%%
+}%%
+}%
+
+
+\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*{\Edynkin}[2][0]%
+%\Edynkin[p]{n} gives the Dynkin diagram of En, n=6,7,8, with parabolic subgroup p.
+{
+\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) {};
+}%%%
+}
+
+
+\newcommand*{\Ffourdynkin}[1][0]%
+%\Fdynkin[p]{n} gives the Dynkin diagram of F4 with parabolic subgroup p.
+{
+\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) {};
+}%%%
+}
+
+\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) {};
+}%%%
+}%%
+
+
+
+\endinput