summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty976
1 files changed, 507 insertions, 469 deletions
diff --git a/Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty b/Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty
index d1050d88397..6d727c841cd 100644
--- a/Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty
+++ b/Master/texmf-dist/tex/latex/lie-hasse/lie-hasse.sty
@@ -1,24 +1,20 @@
-% The Lie Hasse package.
+% The Lie Hasse package.
+% Version 1.01
%
-% Version 1.0
%
+% This package draws Hasse diagrams of root system posets of simple
+% Lie algebraS, in LaTeX documents, using the TikZ package.
%
-% This package draws Hasse diagrams of root system posets of simple
-% Lie algebraS, in LaTeX documents, using the TikZ package.
+% Benjamin McKay
+% b.mckay@ucc.ie
%
-% Benjamin McKay
-% b.mckay@ucc.ie
-%
-% Released under the LaTeX Project Public License v1.3c or later, see
+% 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{lie-hasse}[2020/02/02 Lie Hasse]
+\ProvidesPackage{lie-hasse}[2024/07/09 Lie Hasse]
\RequirePackage[rgb]{xcolor}
\RequirePackage{dynkin-diagrams}
+\RequirePackage[outline]{contour}
\usetikzlibrary{
positioning,
fadings,
@@ -26,7 +22,7 @@
%%%
%%% Application programming interface:
%%%
-
+\NewDocumentCommand\edgeQuote{m}{\contour{white}{\(#1\)}}
\newif\iflie@hasse@threeD
\lie@hasse@threeDtrue
\xdef\lie@hasse@three@D@shift{.3}%
@@ -40,14 +36,27 @@
\lie@hasse@show@heightfalse
\newif\iflie@hasse@attach@dynkin@diagram
\lie@hasse@attach@dynkin@diagramfalse
-
+\newif\iflie@hasse@show@levi
+\lie@hasse@show@levitrue
+\newif\iflie@hasse@show@unipotent@radical
+\lie@hasse@show@unipotent@radicaltrue
\pgfkeys{
/Lie Hasse diagram/.is family,
/Lie Hasse diagram,
- attach Dynkin diagram/.is if = lie@hasse@attach@dynkin@diagram,
+ attach Dynkin diagram/.is if
+ = lie@hasse@attach@dynkin@diagram,
attach Dynkin diagram/.default = false,
- edge/.style={ultra thick},
- edge quotes/.style={/Dynkin diagram/text style,auto,inner sep=2pt},
+ edge/.style = {
+ ultra thick
+ },
+ edge length/.estore in
+ = \lie@hasse@edge@length,
+ edge length = 1cm,
+ edge quotes/.style={
+ /Dynkin diagram/text style,
+ auto,
+ inner sep=2pt
+ },
compact edge/.style={},
noncompact edge/.style={opacity=0},
compact root/.code={\dynkinDrawSolidRootMark{#1}},
@@ -67,7 +76,13 @@
show widths/.default = false,
show height/.is if = lie@hasse@show@height,
show height/.default = false,
- z shift/.estore in = \lie@hasse@three@D@shift,
+ show Levi/.is if = lie@hasse@show@levi,
+ show Levi/.default = true,
+ show unipotent radical/.is if
+ = lie@hasse@show@unipotent@radical,
+ show unipotent radical/.default = true,
+ z shift/.estore in
+ = \lie@hasse@three@D@shift,
z shift/.default = .3,
top/.style={black!20,opacity=.4},
left/.style={black!20,opacity=.9},
@@ -90,13 +105,17 @@
\dynkin@integer@rank%
}%
{%
- % Turn Satake codes into Dynkin diagram expressions in \dynkin@string.
+ % Turn Satake codes into Dynkin diagram
+ % expressions in \dynkin@string.
\dynkin@grok@Satake@codes%
}%
- % Expand out any digits in \dynkin@string into multiples of the various root marks.
+ % Expand out any digits in \dynkin@string
+ % into multiples of the various root marks.
\expand@Dynkin@Roots@Digits%
- % Assign to \dynkin@roots the input string \dynkin@string with all . symbols removed,
- % so we only get the symbols representing the marks for the various roots.
+ % Assign to \dynkin@roots the input string
+ % \dynkin@string with all . symbols removed,
+ % so we only get the symbols representing
+ % the marks for the various roots.
\StrDel{\dynkin@string}{.}[\temp]%
\xdef\dynkin@roots{\temp}%
\StrLen{\dynkin@roots}[\temp]%
@@ -115,58 +134,33 @@
{%
\pgfkeys{/Lie Hasse diagram/for all roots={#1}{#2}}%
}%
+\newif\iflie@hasse@B
+\newcount\dynkin@rank@plus@one%
\NewDocumentCommand\hasse{O{}mm}%
{%
\ifdefined\filldraw%
- \IfStrEq{#1}{}%
- {%
+ \ifx#1\empty\relax%
\studyHasseDiagramOfRootSystem{#2}{#3}%
- }%
- {%
+ \else%
\studyHasseDiagramOfRootSystem[#1]{#2}{#3}%
- }%
+ \fi%
\label@item@count 0\relax%
\expandafter\forcsvlist%
- \expandafter\add@label%
+ \expandafter\lie@hasse@add@label%
\expandafter{\dynkin@label@list}%
\ifnum\dynkin@rank=1%
\dynkin{A}{1}%
\else%
+ \global\dynkin@rank@plus@one\the\dynkin@rank\relax%
+ \global\advance\dynkin@rank@plus@one by 1\relax%
\add@compact@simple@roots@to@compact@roots{}%
\IfStrEqCase{#2}%
{%%
{A}{\hasse@A}%
- {B}{\hasse@BC}%
- {C}{\hasse@BC*}%
+ {B}{\global\lie@hasse@Btrue\hasse@BC}%
+ {C}{\global\lie@hasse@Bfalse\hasse@BC}%
{D}{\hasse@D}%
- {E}%
- {%
- \ifnum\dynkin@rank=6%
- \hasse@E@six%
- \else%
- \ifnum\dynkin@rank=7%
- \hasse@E@seven%
- \else%
- \ifnum\dynkin@rank=8%
- \hasse@E@eight%
- \else
- \ifnum\dynkin@rank>8%
- \ClassError%
- {Lie Hasse}%
- {Rank of E series Hasse diagram: #3{}%
- exceeds 8; not defined yet}%
- {}%
- \fi%
- \ifnum\dynkin@rank<6%
- \ClassError%
- {Lie Hasse}%
- {Rank of E series Hasse diagram: #3{} less than 6}%
- {}%
- \fi%
- \fi%
- \fi%
- \fi%
- }%
+ {E}{\hasse@E@series}%
{F}%
{%
\ifnum\dynkin@rank=4%
@@ -194,10 +188,11 @@
{Lie Hasse}%
{Lie algebra series #2{} not A,B,C,D,E,F or G}%
{}]%
+ \forAllPositiveRoots{\draw@lie@hasse@root}%
\draw@simple@root@labels%
\fi%
\lie@hasse@write@widths{}%
- \forAllPositiveRootsInHasseDiagram{\doRootThing}%
+ \forAllPositiveRoots{\doRootThing}%
\iflie@hasse@attach@dynkin@diagram%
\attachDynkin%
\fi%
@@ -205,13 +200,42 @@
\begin{tikzpicture}\hasse[#1]{#2}{#3}\end{tikzpicture}%
\fi%
}%
+\NewDocumentCommand\hasse@E@series{}%
+{%
+ \ifnum\dynkin@rank=6%
+ \hasse@E@six%
+ \else%
+ \ifnum\dynkin@rank=7%
+ \hasse@E@seven%
+ \else%
+ \ifnum\dynkin@rank=8%
+ \hasse@E@eight%
+ \else%
+ \ifnum\dynkin@rank>8%
+ \ClassError%
+ {Lie Hasse}%
+ {Rank of E series Hasse diagram: \the\dynkin@rank{}%
+ exceeds 8; not defined yet}%
+ {}%
+ \fi%
+ \ifnum\dynkin@rank<6%
+ \ClassError%
+ {Lie Hasse}%
+ {Rank of E series Hasse diagram: \the\dynkin@rank{}%
+ less than 6; not define yet}%
+ {}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
\NewDocumentCommand\drawRootAsDynkinSum{mm}%
{%
\rootSum{#1}{#2}{\rs}%
\node at (#1;#2)
{%
\dynkin[%
- labels=\rs,%
+ expand labels=\rs,%
/Lie Hasse diagram/embedded Dynkin diagram]%
{\dynkin@series}{\the\dynkin@rank}%
};%
@@ -239,25 +263,38 @@
}%
\fi%
}%
-
-\NewDocumentCommand\backwardsGtwo{}%
+\NewDocumentCommand\hasseAttachGtwo{}%
{%
- \dynkin[label,backwards,x shift in edge lengths=-1]{G}{\dynkin@roots}%
+ \dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
+% label,%
+% backwards,%
+% x shift in edge lengths=-1
+]{G}{\dynkin@roots}%
}%
-
\newcount\lie@hasse@E@shift%
\NewDocumentCommand\attachDynkin{}%
{%
\IfStrEqCase{\dynkin@series}{%
- {A}{\dynkin{A}{\dynkin@roots}}%
- {B}{\dynkin{B}{\dynkin@roots}}%
- {C}{\dynkin{C}{\dynkin@roots}}%
- {D}{\dynkin[y shift in edge lengths=-1.5,label]%
- {D}{\dynkin@roots}}%
+ {A}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {A}{\dynkin@roots}}%
+ {B}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {B}{\dynkin@roots}}%
+ {C}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {C}{\dynkin@roots}}%
+ {D}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
+ y shift in edge lengths=-1.5,label]%
+ {D}{\dynkin@roots}}%
{E}%
{%%
\ifnum\dynkin@rank=6%
\dynkin[%
+ vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
upsidedown,%
labels*={1,...,6},%
y shift in edge lengths=.5]%
@@ -266,6 +303,8 @@
\lie@hasse@E@shift\the\dynkin@rank\relax%
\advance\lie@hasse@E@shift by -2\relax%
\dynkin[%
+ vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
backwards,%
upsidedown,%
label,%
@@ -274,16 +313,17 @@
{E}{\dynkin@roots}%
\fi%
}%%
- {F}{\dynkin{F}{\dynkin@roots}}%
- {G}{\backwardsGtwo{}}%
+ {F}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {F}{\dynkin@roots}}%
+ {G}{\hasseAttachGtwo}%
}%
[\ClassError%
{Lie Hasse}%
- {Lie algebra series \dynkin@series{} not A,B,C,D,E,F or G when attaching Dynkin diagram}%
+ {Lie algebra series \dynkin@series{} %
+ not A,B,C,D,E,F or G when attaching Dynkin diagram}%
{}]%
}%
-
-
\newif\iflie@hasse@multiple@diagrams
\newcommand\doHasseDiagram[1]%%
{%
@@ -291,8 +331,7 @@
\ %
\fi%
\begin{tikzpicture}%
- [show background rectangle,%
- baseline=(current bounding box.east)]]%
+ [show background rectangle,baseline=(current bounding box.east)]%
\hasse#1%
\iflie@hasse@show@height%
\rootSystemHeight{\lie@hasse@height}%
@@ -327,33 +366,25 @@
}%
\begin{center}%
\expandafter\forscsvlist%
- \expandafter\doHasseDiagram%
- \expandafter{#1}%
+ \expandafter\doHasseDiagram\expandafter{#1}%
\end{center}%
}%
-
-
%%%
%%% Package internals:
%%%
-
-
\pgfdeclarelayer{Dynkin middle}
\pgfdeclarelayer{Dynkin above}
\pgfsetlayers{background,Dynkin behind,Dynkin middle,Dynkin above,main}
-
-
\newcommand*\label@list@at[1]{\csname FOOBAR-#1\endcsname}
\newcommand*\defn@label@list@entry[1]{\expandafter\def\csname FOOBAR-#1\endcsname}
\def\add@to@label@list#1#2{\global\defn@label@list@entry{#1}{#2}}%
\newcount\label@item@count%
\label@item@count 0\relax%
-\newcommand\add@label[1]%
+\newcommand\lie@hasse@add@label[1]%
{%
- \advance\label@item@count by 1\relax%
+ \global\advance\label@item@count by 1\relax%
\global\add@to@label@list{\the\label@item@count}{#1}%
}%
-
\xdef\lie@hasse@compact@roots{}%
\NewDocumentCommand\if@compact@root{mmm}%
{%
@@ -369,9 +400,8 @@
\dynkinOrder{\dynkin@series}{\the\dynkin@rank}.Carter::#1->\dynkin@ordering.%
{\current@simple@root}%
\StrChar{\dynkin@roots}{\current@simple@root}[\lie@hasse@root@marker]%
-\IfStrEq{*}{\lie@hasse@root@marker}{#2}{#3}%
+\IfStrEq{x}{\lie@hasse@root@marker}{#3}{#2}%
}%
-
\NewDocumentCommand\add@compact@root{m}%
{%
\if@compact@root{#1}%
@@ -382,53 +412,65 @@
\xdef\lie@hasse@compact@roots{\temp@lie@hasse@compact@roots{ }(#1)}%
}%
}%
-
\newcount\lie@hasse@sr%
-\newcount\drpo%
\NewDocumentCommand\add@compact@simple@roots@to@compact@roots{}%
{%
-\lie@hasse@sr 1\relax%
-\drpo\the\dynkin@rank\relax%
-\advance\drpo by 1\relax%
-\loop%
- \if@compact@simple@root{\the\lie@hasse@sr}%
- {%%
- \add@compact@root{1;\the\lie@hasse@sr}%
- }%%
- {%%
- }%%
- \advance\lie@hasse@sr by 1\relax%
-\ifnum\lie@hasse@sr<\the\drpo%
-\repeat%
+ \lie@hasse@sr 1\relax%
+ \loop%
+ \if@compact@simple@root{\the\lie@hasse@sr}%
+ {%%
+ \add@compact@root{1;\the\lie@hasse@sr}%
+ }%%
+ {%%
+ }%%
+ \advance\lie@hasse@sr by 1\relax%
+ \ifnum\lie@hasse@sr<\the\dynkin@rank@plus@one%
+ \repeat%
}%
-
-\newcount\drmo%
\newcount\lie@hasse@root@count%
\newcount\lie@hasse@root@count@b%
\newcount\max@lie@hasse@root@count%
\newcount\lie@hasse@reorder
-
\NewDocumentCommand\lie@hasse@fix@order{mm}%
{%
\dynkinOrder{\dynkin@series}{\dynkin@rank}.Carter::{#1}->\dynkin@ordering.{#2}%
}%
-
\NewDocumentCommand\draw@one@simple@root@label{mm}%
%% \draw@one@simple@root@label{r}{s}, draw at Carter number r
%% the root with text s.
{%
- \node[below,%
- label=%
- {%
- [below,%
- lie@hasse@color,%
- /Lie Hasse diagram/edge quotes]%
- \(\pgfkeys{/Dynkin diagram/label macro=#2}\)%
- }%
- ]%
- at%
- (1;#1)%
- {};%
+ \if@compact@simple@root{#1}%
+ {%
+ \iflie@hasse@show@levi%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ }%
+ {%
+ \iflie@hasse@show@unipotent@radical%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ }%
+ \iflie@hasse@ok@root%
+ \node[%
+ below,%
+ label=%
+ {%
+ [%
+ below,%
+ lie@hasse@color,%
+ /Lie Hasse diagram/edge quotes%
+ ]%
+ \(\pgfkeys{/Dynkin diagram/label macro={\edgeQuote{#2}}}\)%
+ }%
+ ]%
+ at%
+ (1;#1)%
+ {};%
+ \fi%
}%
\NewDocumentCommand\draw@simple@root@labels{}%
{%
@@ -471,27 +513,56 @@
\pgfmathsetmacro{\lie@hasse@huenum}{#1/\the\dynkin@rank}%
\global\definecolor{lie@hasse@color}{hsb}{\lie@hasse@huenum,1,.6}%
}%
-\NewDocumentCommand\draw@lie@hasse@root{m}%
+\NewDocumentCommand\draw@lie@hasse@root{mm}%
{%
-\if@compact@root{#1}%
-{%%
-\pgfkeys{/Lie Hasse diagram/compact root=#1}%
-}%%
-{%%
-\pgfkeys{/Lie Hasse diagram/noncompact root=#1}%
-}%%
+ \if@compact@root{#1;#2}%
+ {%%
+ \iflie@hasse@show@levi%
+ \pgfkeys{/Lie Hasse diagram/compact root={#1;#2}}%
+ \fi%
+ }%%
+ {%%
+ \iflie@hasse@show@unipotent@radical%
+ \pgfkeys{/Lie Hasse diagram/noncompact root={#1;#2}}%
+ \fi%
+ }%%
}%
-\xdef\lie@hasse@grade@a{}
-\xdef\lie@hasse@grade@b{}
-\xdef\lie@hasse@index@a{}
-\xdef\lie@hasse@index@b{}
\newcount\root@gpo%
\xdef\label@text{}%
+\newif\iflie@hasse@is@levi
+\newif\iflie@hasse@ok@root
\NewDocumentCommand\draw@lie@hasse@edge{O{}mmmm}%
%[edge label options]{from grade}{from index}{to index}{simple root}
{%
\root@gpo #2\relax%
\advance\root@gpo by 1\relax%
+ \if@compact@root{#2;#3}%
+ {%
+ \if@compact@simple@root{#5}%
+ {%
+ \global\lie@hasse@is@levitrue%
+ \add@compact@root{\the\root@gpo;#4}%
+ }%
+ {%
+ \global\lie@hasse@is@levifalse%
+ }%
+ }%
+ {%
+ \global\lie@hasse@is@levifalse%
+ }%
+ \iflie@hasse@is@levi%
+ \iflie@hasse@show@levi%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ \else%
+ \iflie@hasse@show@unipotent@radical%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ \fi%
\set@lie@hasse@color{#5}%
\lie@hasse@fix@order{#5}{\lie@hasse@root@count@b}%
\IfStrEq{\dynkin@label@list}{}%
@@ -505,31 +576,33 @@
}%
}%
\if@compact@simple@root{#5}%
- {%%% Compact
- \draw[%
- lie@hasse@color,%
- /Lie Hasse diagram/edge,%
- /Lie Hasse diagram/compact edge]%
- (#2;#3) --%
- node[lie@hasse@color,/Lie Hasse diagram/edge quotes,#1]%
- {\(\pgfkeys{/Dynkin diagram/label macro=\label@text}\)}%
- (\the\root@gpo;#4);%
- \IfSubStr{\lie@hasse@compact@roots}{#2;#3}%
- {%% adding to a compact
- \add@compact@root{\the\root@gpo;#4}%
- }%%
- {%%
- }%%
+ {%%% Compact simple root, i.e. edge
+ \iflie@hasse@ok@root%
+ \draw[%
+ lie@hasse@color,%
+ /Lie Hasse diagram/edge,%
+ /Lie Hasse diagram/compact edge]%
+ (#2;#3)--%
+ node[lie@hasse@color,/Lie Hasse diagram/edge quotes,#1]%
+ {\(\pgfkeys{/Dynkin diagram/label macro={\edgeQuote{\label@text}}}\)}%
+ (\the\root@gpo;#4);%
+ \fi%
+ \iflie@hasse@is@levi%
+ \fi%
}%%%
{%%% Noncompact
- \draw[%
- lie@hasse@color,%
- /Lie Hasse diagram/edge,%
- /Lie Hasse diagram/noncompact edge]%
- (#2;#3) --%
+ \iflie@hasse@ok@root%
+ \draw
+ [%
+ lie@hasse@color,%
+ /Lie Hasse diagram/edge,%
+ /Lie Hasse diagram/noncompact edge%
+ ]%
+ (#2;#3)--%
node[lie@hasse@color,/Lie Hasse diagram/edge quotes,#1]%
- {\(\pgfkeys{/Dynkin diagram/label macro=\label@text}\)}%
+ {\(\pgfkeys{/Dynkin diagram/label macro={\edgeQuote{\label@text}}}\)}%
(\the\root@gpo;#4);%
+ \fi%
}%%%
}%
\newcount\A@series@grade%
@@ -555,8 +628,8 @@
\coordinate
(\the\A@series@grade;\the\A@series@j)
at
- ({.5*\the\A@series@x*\dynkin@edge@length},
- {.25*\the\A@series@y*\dynkin@edge@length})
+ ({.5*\the\A@series@x*\lie@hasse@edge@length},
+ {.25*\the\A@series@y*\lie@hasse@edge@length})
{};%
\advance\A@series@j by 1\relax%
\advance\A@series@x by 2\relax%
@@ -569,59 +642,35 @@
\ifnum\A@series@grade<\the\max@A@series@grade%
\repeat%
}%
-\newcount\A@series@grade%
-\newcount\max@A@series@grade%
-\NewDocumentCommand\draw@A@roots{}%
-{%
- \A@series@grade 1\relax%
- \max@A@series@grade \the\dynkin@rank\relax%
- \advance\max@A@series@grade by 1\relax%
- \loop%
- \max@A@series@j\the\dynkin@rank\relax%
- \advance\max@A@series@j by -\the\A@series@grade\relax%
- \advance\max@A@series@j by 2\relax%
- \A@series@j 1\relax%
- {%
- \loop%
- \draw@lie@hasse@root%
- {\the\A@series@grade;\the\A@series@j}%
- \advance\A@series@j by 1\relax%
- \ifnum\A@series@j<\the\max@A@series@j%
- \repeat%
- }%
- \advance\A@series@grade by 1\relax%
- \ifnum\A@series@grade<\the\max@A@series@grade%
- \repeat%
-}%
\newcount\maxA@i%
\newcount\maxA@j%
\newcount\A@lbl%
-\newcount\A@i%
-\newcount\A@j%
-\newcount\A@ipo%
+\newcount\lie@hasse@i%
+\newcount\lie@hasse@j%
+\newcount\lie@hasse@ipo%
\newcount\A@rj%
\newcount\A@rjmo%
\NewDocumentCommand\draw@A@edges{}%
{%
\maxA@i\the\dynkin@rank\relax%
- \A@i 1\relax%
+ \lie@hasse@i 1\relax%
\loop%
\maxA@j \the\dynkin@rank\relax%
- \advance\maxA@j by -\the\A@i\relax%
+ \advance\maxA@j by -\the\lie@hasse@i\relax%
\advance\maxA@j by 1\relax%
\ifnum\maxA@j>-1%
- \A@j 1\relax%
+ \lie@hasse@j 1\relax%
{%
\loop%
- \A@lbl\the\A@i\relax%
- \advance\A@lbl by \the\A@j\relax%
- \A@ipo \A@i\relax%
- \advance\A@ipo by 1\relax%
+ \A@lbl\the\lie@hasse@i\relax%
+ \advance\A@lbl by \the\lie@hasse@j\relax%
+ \lie@hasse@ipo \lie@hasse@i\relax%
+ \advance\lie@hasse@ipo by 1\relax%
\draw@lie@hasse@edge[left]%
- {\the\A@i}{\the\A@j}%
- {\the\A@j}{\the\A@lbl}%
+ {\the\lie@hasse@i}{\the\lie@hasse@j}%
+ {\the\lie@hasse@j}{\the\A@lbl}%
\A@rj\the\maxA@j\relax%
- \advance\A@rj by -\the\A@j\relax%
+ \advance\A@rj by -\the\lie@hasse@j\relax%
\advance\A@rj by 1\relax%
\A@rjmo\the\A@rj\relax%
\advance\A@rjmo by -1\relax%
@@ -629,15 +678,15 @@
\advance\A@lbl by \the\dynkin@rank%
\advance\A@lbl by 1%
\draw@lie@hasse@edge[right]%
- {\the\A@i}{\the\A@rj}%
+ {\the\lie@hasse@i}{\the\A@rj}%
{\the\A@rjmo}{\the\A@lbl}%
- \advance\A@j by 1\relax%
- \ifnum\A@j<\the\maxA@j%
+ \advance\lie@hasse@j by 1\relax%
+ \ifnum\lie@hasse@j<\the\maxA@j%
\repeat%
}%
\fi%
- \advance\A@i by 1\relax%
- \ifnum\A@i<\the\maxA@i%
+ \advance\lie@hasse@i by 1\relax%
+ \ifnum\lie@hasse@i<\the\maxA@i%
\repeat%
}%
%% \hasse@A@width@at@grade{g}{\w} sets the counter \w to
@@ -653,7 +702,6 @@
{%
\place@A@roots%
\draw@A@edges%
- \draw@A@roots%
}%
%% \hasse@BC@width@at@grade{g}{\w} sets the counter \w to
%% the value of the width (number of roots) at grade g of
@@ -666,138 +714,116 @@
\global\advance#2 by 1\relax%
\global\divide#2 by 2\relax%
}%
-\newcount\tdrmt%
-\newcount\tdrmo%
+\newcount\twice@dynkin@rank@minus@one%
\newcount\max@BC@r%
\newcount\BC@r%
\newcount\BC@series@x%
\newcount\BC@series@y%
\NewDocumentCommand\place@BC@roots{}%
{%
-\drmo \the\dynkin@rank\relax%
-\advance\drmo by -1\relax%
-\tdrmt \the\drmo\relax%
-\advance\tdrmt by \the\drmo\relax%
-\tdrmo \the\tdrmt\relax%
-\advance\tdrmo 1\relax%
-\max@BC@r \the\dynkin@rank\relax%
-\advance\max@BC@r by 1\relax%
-\BC@r 1\relax%
-\loop%
- \BC@series@x \the\BC@r\relax%
- \advance\BC@series@x by -1\relax%
- \advance\BC@series@x by \the\BC@series@x\relax%
- \BC@series@y 1\relax%
- {%%
+ \twice@dynkin@rank@minus@one \the\dynkin@rank\relax%
+ \advance\twice@dynkin@rank@minus@one by \the\dynkin@rank\relax%
+ \advance\twice@dynkin@rank@minus@one by -1\relax%
+ \max@BC@r \the\dynkin@rank\relax%
+ \advance\max@BC@r by 1\relax%
+ \BC@r 1\relax%
\loop%
- \coordinate
- (\the\BC@series@y;\the\BC@r)
- at
- ({.5*\the\BC@series@x*\dynkin@edge@length},
- {.5*(\the\BC@series@y-1)*\dynkin@edge@length})
- {};%
- \advance\BC@series@y by 1\relax%
- \advance\BC@series@x by 1\relax%
- \ifnum\BC@series@x<\the\tdrmo\repeat%
- }%%
- \advance\BC@r by 1\relax%
- \ifnum\BC@r<\the\max@BC@r%
-\repeat%
+ \BC@series@x \the\BC@r\relax%
+ \advance\BC@series@x by -1\relax%
+ \advance\BC@series@x by \the\BC@series@x\relax%
+ \BC@series@y 1\relax%
+ {%%
+ \loop%
+ \coordinate
+ (\the\BC@series@y;\the\BC@r)
+ at
+ ({.5*\the\BC@series@x*\lie@hasse@edge@length},
+ {.5*(\the\BC@series@y-1)*\lie@hasse@edge@length})
+ {};%
+ \advance\BC@series@y by 1\relax%
+ \advance\BC@series@x by 1\relax%
+ \ifnum\BC@series@x<\the\twice@dynkin@rank@minus@one\repeat%
+ }%%
+ \advance\BC@r by 1\relax%
+ \ifnum\BC@r<\the\max@BC@r%
+ \repeat%
+}%
+\newcount\BC@height%
+\newcount\BC@g%
+\NewDocumentCommand\draw@BC@edges{}%
+{%
+ \rootSystemHeight{\BC@height}%
+ \ifnum\BC@height>1%
+ \BC@g 1\relax%
+ \loop%
+ \draw@BC@edges@at@grade{\the\BC@g}%
+ \global\advance\BC@g by 1\relax%
+ \ifnum\BC@g<\BC@height%
+ \repeat%
+ \fi%
}%
-\newcount\max@BC@i%
\newcount\BC@i%
-\newcount\BC@series@x%
-\newcount\BC@series@y%
+\newcount\BC@width%
+\newcount\BC@width@plus@one%
+\NewDocumentCommand\draw@BC@edges@at@grade{m}%
+{%
+ \rootSystemWidthAtGrade{#1}{\BC@width}%
+ \BC@width@plus@one \BC@width\relax%
+ \advance \BC@width@plus@one by 1\relax%
+ \BC@i 1\relax%
+ {%
+ \loop%
+ \draw@BC@edges@at@root{#1}{\the\BC@i}%
+ \global\advance\BC@i by 1\relax%
+ \ifnum\BC@i<\BC@width@plus@one\repeat%
+ }%
+}%
+\newcount\BC@height%
\newcount\BC@ii%
-\newcount\BC@series@yy%
-\newcount\BC@series@yy%
-\newcount\lbl%
+\newif\ifBC@draw%
+\newcount\lie@hasse@lbl%
\newcount\temp@lbl%
-\NewDocumentCommand\draw@BC@edges{s}%
-{%
-\tdrmo \the\dynkin@rank\relax%
-\advance\tdrmo by \the\dynkin@rank\relax%
-\advance\tdrmo by -1\relax%
-\max@BC@i \the\dynkin@rank\relax%
-\advance\max@BC@i by 1\relax%
-\BC@i 1\relax%
-\loop%
- \BC@series@x \the\BC@i\relax%
- \advance\BC@series@x by \the\BC@i\relax%
- \advance\BC@series@x by -2\relax%
- \BC@series@y 1\relax%
- {%%
- \loop%
- \ifnum\BC@i>1%
- % draw an edge upward to the left
- \BC@ii \the\BC@i\relax%
- \advance\BC@ii by -1\relax%
- \BC@series@yy \the\BC@series@y\relax%
- \advance\BC@series@yy by 1\relax%
- \draw@lie@hasse@edge[right]%
- {\the\BC@series@y}{\the\BC@i}%
- {\the\BC@ii}%
- {\the\BC@ii}%
+\NewDocumentCommand\draw@BC@edges@at@root{mm}%
+{%
+ \ifnum#2>1%
+ % draw an edge upward to the left
+ \BC@ii #2\relax%
+ \advance\BC@ii by -1\relax%
+ \draw@lie@hasse@edge[right]%
+ {#1}{#2}%
+ {\the\BC@ii}
+ {\the\BC@ii}%
+ \fi%
+ \BC@drawtrue%
+ \ifodd#1
+ \ifnum#2=\the\BC@width%
+ \global\BC@drawfalse%
\fi%
- \ifnum\BC@series@y>1%
- % draw an edge downward to the left
- \BC@series@yy \the\BC@series@y\relax%
- \advance\BC@series@yy by -1\relax%
- \lbl \the\BC@i\relax%
- \advance\lbl by \the\BC@series@y\relax%
- \advance\lbl by -1\relax%
- \ifnum\dynkin@rank<\the\lbl%
- \temp@lbl \the\lbl\relax%
- \lbl \the\dynkin@rank\relax%
- \advance\lbl by \the\dynkin@rank%
- \advance\lbl by -\the\temp@lbl%
+ \fi%
+ \ifBC@draw%
+ % draw an edge upward to the right
+ \lie@hasse@lbl #2\relax%
+ \advance\lie@hasse@lbl by #1\relax%
+ \ifnum\dynkin@rank<\the\lie@hasse@lbl%
+ \temp@lbl \the\lie@hasse@lbl\relax%
+ \lie@hasse@lbl \the\dynkin@rank\relax%
+ \advance\lie@hasse@lbl by \the\dynkin@rank%
+ \advance\lie@hasse@lbl by -\the\temp@lbl%
%% For the B series:
- \IfBooleanF{#1}{\global\advance\lbl by 1\relax}%
- \draw@lie@hasse@edge[left]%
- {\the\BC@series@yy}{\the\BC@i}%
- {\the\BC@i}%
- {\the\lbl}%
- \else%
- \draw@lie@hasse@edge[left]%
- {\the\BC@series@yy}{\the\BC@i}%
- {\the\BC@i}%
- {\the\lbl}%
+ \iflie@hasse@B%
+ \global\advance\lie@hasse@lbl by 1\relax%
\fi%
+ \draw@lie@hasse@edge[left]%
+ {#1}{#2}%
+ {#2}%
+ {\the\lie@hasse@lbl}%
+ \else%
+ \draw@lie@hasse@edge[left]%
+ {#1}{#2}%
+ {#2}%
+ {\the\lie@hasse@lbl}%
\fi%
- \advance\BC@series@y by 1\relax%
- \advance\BC@series@x by 1\relax%
- \ifnum\BC@series@x<\the\tdrmo\repeat%
- }%%
- \advance\BC@i by 1\relax%
- \ifnum\BC@i<\the\max@BC@i%
-\repeat%
-}%
-\newcount\tdrpt%
-\newcount\BC@r%
-\newcount\BC@series@y%
-\newcount\maxy%
-\NewDocumentCommand\draw@BC@roots{}%
-{%
-\tdrpt \the\dynkin@rank\relax%
-\advance\tdrpt by \the\dynkin@rank\relax%
-\advance\tdrpt by 2\relax%
-\max@BC@r \the\dynkin@rank\relax%
-\advance\max@BC@r by 1\relax%
-\BC@r 1\relax%
-\loop%
- \BC@series@y 1\relax%
- \maxy \tdrpt\relax%
- \advance\maxy -\the\BC@r\relax%
- \advance\maxy -\the\BC@r\relax%
- {%%
- \loop%
- \draw@lie@hasse@root{\the\BC@series@y;\the\BC@r}%
- \advance\BC@series@y by 1\relax%
- \ifnum\BC@series@y<\the\maxy\repeat%
- }%%
- \advance\BC@r by 1\relax%
- \ifnum\BC@r<\the\max@BC@r%
-\repeat%
+ \fi%
}%
\NewDocumentCommand\hasse@BC{s}% star for C:
{%
@@ -809,7 +835,6 @@
{%
\draw@BC@edges%
}%
- \draw@BC@roots%
}%
\NewDocumentCommand\hasse@D{}%
{%
@@ -818,51 +843,45 @@
\iflie@hasse@threeD%
\draw@D@hasse@three@D%
\fi%
- \draw@D@roots%
}%
-\newcount\drmt%
\NewDocumentCommand\draw@D@hasse@three@D{}%
{%
- \drmo \the\dynkin@rank\relax%
- \advance\drmo by -1\relax%
- \drmt \the\dynkin@rank\relax%
- \advance\drmt by -2\relax%
\begin{pgfonlayer}{Dynkin middle}%
\fill[/Lie Hasse diagram/left]
- (\the\drmt;1) --
- (\the\drmo;1) --
+ (\the\dynkin@rank@minus@two;1) --
+ (\the\dynkin@rank@minus@one;1) --
(\the\dynkin@rank;1) --
- (\the\drmo;2) --
+ (\the\dynkin@rank@minus@one;2) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmt;1) --
- (1;\the\drmt) --
- (2;\the\drmo) --
- (\the\drmo;2) --
+ (\the\dynkin@rank@minus@two;1) --
+ (1;\the\dynkin@rank@minus@two) --
+ (2;\the\dynkin@rank@minus@one) --
+ (\the\dynkin@rank@minus@one;2) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmo;2) --
+ (\the\dynkin@rank@minus@one;2) --
(\the\dynkin@rank;1) --
- (3;\the\drmo) --
- (2;\the\drmo) --
+ (3;\the\dynkin@rank@minus@one) --
+ (2;\the\dynkin@rank@minus@one) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmo;1) --
+ (\the\dynkin@rank@minus@one;1) --
(\the\dynkin@rank;1) --
- (3;\the\drmo) --
- (2;\the\drmt) --
+ (3;\the\dynkin@rank@minus@one) --
+ (2;\the\dynkin@rank@minus@two) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmt;1) --
- (\the\drmo;1) --
- (2;\the\drmt) --
- (1;\the\drmt) --
+ (\the\dynkin@rank@minus@two;1) --
+ (\the\dynkin@rank@minus@one;1) --
+ (2;\the\dynkin@rank@minus@two) --
+ (1;\the\dynkin@rank@minus@two) --
cycle;%
\fill[/Lie Hasse diagram/left]
- (1;\the\drmt) --
- (2;\the\drmt) --
- (3;\the\drmo) --
- (2;\the\drmo) --
+ (1;\the\dynkin@rank@minus@two) --
+ (2;\the\dynkin@rank@minus@two) --
+ (3;\the\dynkin@rank@minus@one) --
+ (2;\the\dynkin@rank@minus@one) --
cycle;%
\end{pgfonlayer}%
}%
@@ -883,9 +902,7 @@
\newcount\D@g%
\newcount\maxD@grd%
\newcount\D@grd%
-\newcount\maxxD%
-\newcount\iD%
-\newcount\xxD%
+\newcount\lie@hasse@D@x%
\newcount\sum@D%
\NewDocumentCommand\place@D@roots{}%
{%
@@ -918,37 +935,34 @@
\repeat%
}%
}%
-\newcount\drpo%
\NewDocumentCommand\place@D@root@at{mm}%
{%
- \xxD #1\relax%
- \advance\xxD by #2\relax%
- \advance\xxD by #2\relax%
- \advance\xxD by -3\relax%
- \drpo \the\dynkin@rank\relax%
- \advance\drpo by 1\relax%
+ \lie@hasse@D@x #1\relax%
+ \advance\lie@hasse@D@x by #2\relax%
+ \advance\lie@hasse@D@x by #2\relax%
+ \advance\lie@hasse@D@x by -3\relax%
\sum@D #1\relax%
\advance\sum@D by #2\relax%
\ifnum\sum@D=\the\dynkin@rank%
\global\def\D@root@x%
- {\the\xxD-\lie@hasse@three@D@shift}%
+ {\the\lie@hasse@D@x-\lie@hasse@three@D@shift}%
\else%
- \ifnum\sum@D=\the\drpo%
+ \ifnum\sum@D=\the\dynkin@rank@plus@one%
\ifnum#1<\the\dynkin@rank%
\global\def\D@root@x%
- {\the\xxD-2+\lie@hasse@three@D@shift}%
+ {\the\lie@hasse@D@x-2+\lie@hasse@three@D@shift}%
\else%
- \global\def\D@root@x{\the\xxD}%
+ \global\def\D@root@x{\the\lie@hasse@D@x}%
\fi%
\else%
\ifnum\sum@D<\the\dynkin@rank%
- \global\def\D@root@x{\the\xxD}%
+ \global\def\D@root@x{\the\lie@hasse@D@x}%
\else%
% if \sum@D exceeds rank+1
\ifnum#1<\the\dynkin@rank%
- \global\def\D@root@x{\the\xxD-2}%
+ \global\def\D@root@x{\the\lie@hasse@D@x-2}%
\else%
- \global\def\D@root@x{\the\xxD}%
+ \global\def\D@root@x{\the\lie@hasse@D@x}%
\fi%
\fi%
\fi%
@@ -956,7 +970,7 @@
\coordinate
(#1;#2)
at
- ({(\D@root@x)*\dynkin@edge@length/2},{(#1-1)*\dynkin@edge@length/2})
+ ({(\D@root@x)*\lie@hasse@edge@length/2},{(#1-1)*\lie@hasse@edge@length/2})
{};%
}%
\NewDocumentCommand\draw@D@edges{}%
@@ -983,7 +997,8 @@
\D@r 1\relax%
{%
\loop%
- \draw@D@edges@at{#1}{\the\D@r}{\the\max@D@roots}%
+%%% \draw@D@edges@at{#1}{\the\D@r}{\the\max@D@roots}%
+ \draw@D@edges@at{#1}{\the\D@r}%
\advance\D@r by 1\relax%
\ifnum\D@r<\the\max@D@roots@plus@one%
\repeat%
@@ -1000,10 +1015,6 @@
\newcount\hasse@D@label%
\NewDocumentCommand\draw@D@edges@at{mm}%
{%
- \drmo\the\dynkin@rank\relax%
- \advance\drmo by -1\relax%
- \drpo \the\dynkin@rank\relax%
- \advance\drpo by 1\relax%
\hasse@D@gpo#1\relax%
\advance\hasse@D@gpo by 1\relax%
\hasse@D@gpi#1\relax%
@@ -1035,7 +1046,7 @@
\xdef\hasse@D@layer{Dynkin above}%
\else%
% below or middle.
- \ifnum\hasse@D@gpi=\the\drpo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@plus@one%
\xdef\hasse@D@layer{Dynkin behind}%
\fi%
\fi%
@@ -1045,7 +1056,7 @@
\fi%
\fi%
\ifnum\dynkin@rank>#1%
- \ifnum\hasse@D@gpi<\the\drpo%
+ \ifnum\hasse@D@gpi<\the\dynkin@rank@plus@one%
\else%
\global\advance\hasse@D@label -1\relax%
\fi%
@@ -1069,7 +1080,7 @@
\fi%
\fi%
\ifnum#1=1%
- \ifnum\drmo=#2%
+ \ifnum\dynkin@rank@minus@one=#2%
\global\hasse@Dfalse\relax%
\else%
\xdef\hasse@D@LR{right}%
@@ -1080,13 +1091,13 @@
\ifnum\hasse@D@label>\the\dynkin@rank%
\hasse@D@label -\hasse@D@label\relax%
\advance\hasse@D@label \the\dynkin@rank\relax%
- \advance\hasse@D@label \the\drmo\relax%
+ \advance\hasse@D@label \the\dynkin@rank@minus@one\relax%
\fi%
- \ifnum\drmo<#1%
+ \ifnum\dynkin@rank@minus@one<#1%
\else%
\ifnum#2=1%
\else%
- \ifnum\hasse@D@gpi<\the\drpo%
+ \ifnum\hasse@D@gpi<\the\dynkin@rank@plus@one%
\else%
\advance\hasse@D@label 1\relax%
\fi%
@@ -1099,11 +1110,11 @@
\global\advance\hasse@D@target by 1\relax%
\fi%
\else%
- \ifnum\drmo=#1%
+ \ifnum\dynkin@rank@minus@one=#1%
\global\advance\hasse@D@target by -1\relax%
\fi%
\fi%
- \ifnum\hasse@D@gpi=\the\drpo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@plus@one%
\ifnum#2>1%
\xdef\hasse@D@layer{Dynkin behind}%
\xdef\hasse@D@LR{right}%
@@ -1112,7 +1123,7 @@
\ifnum\hasse@D@gpi=\the\dynkin@rank%
\xdef\hasse@D@layer{Dynkin above}%
\else%
- \ifnum\hasse@D@gpi=\the\drmo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@minus@one%
\xdef\hasse@D@layer{Dynkin above}%
\else%
\xdef\hasse@D@layer{Dynkin middle}%
@@ -1129,7 +1140,7 @@
\end{pgfonlayer}%
\fi%
% % Draw any other edges.
- \ifnum\hasse@D@gpi=\the\drmo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@minus@one%
\hasse@D@target#2\relax%
\advance\hasse@D@target by 1\relax%
\begin{pgfonlayer}{Dynkin behind}
@@ -1142,38 +1153,7 @@
}%
\newcount\maxD@grd%
\newcount\D@grd%
-\newcount\maxxD%
\newcount\sum@D%
-\NewDocumentCommand\draw@D@roots{}%
-{%
- \drmo \the\dynkin@rank\relax%
- \advance\drmo by -1\relax%
- \maxD@grd \the\dynkin@rank\relax%
- \advance\maxD@grd by \the\dynkin@rank\relax%
- \advance\maxD@grd by -2\relax%
- \D@grd 1\relax%
- \loop%
- % Construct the roots at grade \D@grd.
- \draw@D@roots@at@grade{\D@grd}%
- \advance\D@grd by 1\relax%
- \ifnum\D@grd<\the\maxD@grd%
- \repeat%
-}%
-\NewDocumentCommand\draw@D@roots@at@grade{m}%
-{%
- \hasse@D@width@at@grade{#1}{\max@D@roots}%
- \max@D@roots@plus@one \the\max@D@roots\relax%
- \advance\max@D@roots@plus@one 1\relax%
- \D@r 1\relax%
- {%
- \loop%
- \draw@lie@hasse@root{\the\D@grd;\the\D@r}%
- \advance\D@r by 1\relax%
- \ifnum\D@r<\the\max@D@roots@plus@one%
- \repeat%
- }%
-}%
-%}%
\newcount\lie@hasse@grade@no
\newcount\lie@hasse@root@no
\def\lie@hasse@XX{}
@@ -1205,14 +1185,14 @@
\coordinate
(\the\lie@hasse@grade@no;\the\lie@hasse@root@no)
at
- ({\lie@hasse@XX*\dynkin@edge@length/2},
- {(\the\lie@hasse@grade@no-1)*\dynkin@edge@length/2}) {};%
+ ({\lie@hasse@XX*\lie@hasse@edge@length/2},
+ {(\the\lie@hasse@grade@no-1)*\lie@hasse@edge@length/2}) {};%
\global\advance\lie@hasse@root@no by 1%
}%
\NewDocumentCommand\lie@hasse@place@root@list{m}%
{%
\global\lie@hasse@root@no 1\relax%
- \expandafter\forcsvlist\expandafter{\lie@hasse@place@root}{#1}%
+ \expandafter\forcsvlist\expandafter\lie@hasse@place@root{#1}%
\global\advance\lie@hasse@grade@no by 1%
}%
\NewDocumentCommand\lie@hasse@place@roots{m}%
@@ -1224,26 +1204,6 @@
}%
\expandafter\docsvlist\expandafter{#1}%
}%
-\NewDocumentCommand\lie@hasse@draw@root{m}%
-{%
- \draw@lie@hasse@root{\the\lie@hasse@grade@no;\the\lie@hasse@root@no}%
- \global\advance\lie@hasse@root@no by 1%
-}%
-\NewDocumentCommand\lie@hasse@root@draw@list{m}%
-{%
- \global\lie@hasse@root@no 1\relax%
- \expandafter\forcsvlist\expandafter{\lie@hasse@draw@root}{#1}%
- \global\advance\lie@hasse@grade@no by 1%
-}%
-\NewDocumentCommand\lie@hasse@draw@roots{m}%
-{%
- \global\lie@hasse@grade@no 1\relax%
- \renewcommand*{\do}[1]%
- {%
- \lie@hasse@root@draw@list{##1}%
- }%
- \expandafter\docsvlist\expandafter{#1}%
-}%
\newcount\lie@hasse@grade@no@plus@one%
\newcount\lie@hasse@edge@count%
\def\lie@hasse@edge@go{%
@@ -1256,7 +1216,8 @@
{%
\global\advance\lie@hasse@edge@count by 1\relax%
\begin{pgfonlayer}{Dynkin above}%
- \lie@hasse@finish@edge#1!%
+%%? \lie@hasse@finish@edge#1!%
+ \lie@hasse@finish@edge#1\relax%
\end{pgfonlayer}%
}%
\def\lie@hasse@process@edge@behind#1!%
@@ -1289,13 +1250,12 @@
\NewDocumentCommand\lie@hasse@process@edge@lists{m}%
{%
\global\lie@hasse@grade@no 1\relax%
- \expandafter\forcsvlist\expandafter{\lie@hasse@process@edge@list}{#1}%
+ \expandafter\forcsvlist\expandafter\lie@hasse@process@edge@list{#1}%
}%
\NewDocumentCommand\hasse@X{mm}%
{%
\lie@hasse@place@roots{#1}%
\lie@hasse@process@edge@lists{#2}%
- \lie@hasse@draw@roots{#1}%
}%
\NewDocumentCommand\hasse@E@six@width@at@grade{mm}%
{%
@@ -1323,7 +1283,11 @@
#2 1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}%
-% In the following code, edges are described by grade: in grade g, the expression i+r<j. means an edge from g;i to (g+1);j labelled by root r, with a label on the left; use > instead of < to get the right. Use a star in front to get this edge on the higher layer.
+% In the following code, edges are described by grade:
+% in grade g, the expression i+r<j. means an edge from
+% g;i to (g+1);j labelled by root r, with a label on
+% the left; use > instead of < to get the right. Use a
+% star in front to get this edge on the higher layer.
\NewDocumentCommand\hasse@E@six{}%
{%
\hasse@X%
@@ -1353,13 +1317,45 @@
}%%%
\iflie@hasse@threeD%
\begin{pgfonlayer}{Dynkin middle}%
-\fill[/Lie Hasse diagram/top] (2;1) -- (5;3) -- (2;5) -- (1;5) -- (2;4) -- (1;3) -- (2;2) -- (1;2) -- cycle;%
-\fill[/Lie Hasse diagram/top] (2;3) -- (4;1) -- (6;2) -- (4;5) -- cycle;%
-\fill[/Lie Hasse diagram/right] (1;3) -- (2;3) -- (4;5) -- (3;5) -- cycle;%
-\fill[/Lie Hasse diagram/left] (3;1) -- (4;1) -- (2;3) -- (1;3) -- cycle;%
-\fill[/Lie Hasse diagram/left] (4;3) -- (5;1) -- (6;1) -- (5;2) -- cycle;%
-\fill[/Lie Hasse diagram/right] (4;3) -- (5;2) -- (6;3) -- (5;4) -- cycle;%
-\fill[/Lie Hasse diagram/top] (5;2) -- (7;1) -- (9;1) -- (7;3) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (2;1) --
+ (5;3) --
+ (2;5) --
+ (1;5) --
+ (2;4) --
+ (1;3) --
+ (2;2) --
+ (1;2) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (2;3) --
+ (4;1) --
+ (6;2) --
+ (4;5) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (1;3) --
+ (2;3) --
+ (4;5) --
+ (3;5) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (3;1) --
+ (4;1) --
+ (2;3) --
+ (1;3) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (4;3) --
+ (5;1) --
+ (6;1) --
+ (5;2) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (4;3) --
+ (5;2) --
+ (6;3) --
+ (5;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (5;2) --
+ (7;1) --
+ (9;1) --
+ (7;3) -- cycle;%
\end{pgfonlayer}%
\fi%
}%
@@ -1399,7 +1395,6 @@
#2 1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}%
-
\NewDocumentCommand\hasse@E@seven{}%
{%
\hasse@X%
@@ -1457,20 +1452,64 @@
}%%%
\iflie@hasse@threeD%
\begin{pgfonlayer}{Dynkin middle}%
-\fill[/Lie Hasse diagram/top] (2;1) -- (6;3) -- (2;6) -- (1;6) -- (2;5) -- (1;4) -- (2;3) -- (1;3) --
- (2;2) -- (1;2) -- cycle;%
-\fill[/Lie Hasse diagram/top] (5;1) -- (7;3) -- (4;6) -- (2;4) -- cycle;%
-\fill[/Lie Hasse diagram/top] (7;1) -- (9;3) -- (7;5) -- (5;4) -- cycle;%
-\fill[/Lie Hasse diagram/top] (9;1) -- (12;1) -- (13;1) -- (14;1) -- (11;3) -- (7;2) -- cycle;%
-\fill[/Lie Hasse diagram/right] (1;4) -- (2;4) -- (4;6) -- (3;6) -- cycle;%
-\fill[/Lie Hasse diagram/left] (4;1) -- (5;1) -- (2;4) -- (1;4) -- cycle;%
-\fill[/Lie Hasse diagram/left] (4;4) -- (6;1) -- (8;1) -- (7;2) -- (6;2) -- (5;4) -- cycle;%
-\fill[/Lie Hasse diagram/right] (4;4) -- (5;4) -- (6;5) -- (5;6) -- cycle;%
-\fill[/Lie Hasse diagram/right] (6;2) -- (7;2) -- (9;4) -- (8;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (2;1) --
+ (6;3) --
+ (2;6) --
+ (1;6) --
+ (2;5) --
+ (1;4) --
+ (2;3) --
+ (1;3) --
+ (2;2) --
+ (1;2) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (5;1) --
+ (7;3) --
+ (4;6) --
+ (2;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (7;1) --
+ (9;3) --
+ (7;5) --
+ (5;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (9;1) --
+ (12;1) --
+ (13;1) --
+ (14;1) --
+ (11;3) --
+ (7;2) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (1;4) --
+ (2;4) --
+ (4;6) --
+ (3;6) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (4;1) --
+ (5;1) --
+ (2;4) --
+ (1;4) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (4;4) --
+ (6;1) --
+ (8;1) --
+ (7;2) --
+ (6;2) --
+ (5;4) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (4;4) --
+ (5;4) --
+ (6;5) --
+ (5;6) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (6;2) --
+ (7;2) --
+ (9;4) --
+ (8;4) -- cycle;%
\end{pgfonlayer}%
\fi%
}%
-
\NewDocumentCommand\hasse@E@eight@width@at@grade{mm}%
{%
\ifnum#1=1%
@@ -1527,7 +1566,6 @@
#2 1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}%
-
\NewDocumentCommand\hasse@E@eight{}%
{%
\hasse@X{%
@@ -1754,11 +1792,11 @@
{{0,2,4,6},{1,3,5},{2,3:1,4},{2:1,3,4:1},{1:1,3:1,5:1},{2:1,4:1},{1:1,3:1},{2:1},{2:2},{2:3},{2:4}}%
{% grades:
{% 1
-1+2<1,*2+3<2,*3+4<3,*2+1>1,*3+2>2,4+3>3},
+1+2<1,*2+3>2,*3+4>3,*2+1<1,*3+2<2,4+3>3},
{% 2
-*1+3<1,*2+4<3,*2+3<2,*2+1<1,3+2>3},
+*1+3<1,*2+4>3,*2+1<1,*2+3>2,3+2>3},
{% 3
-*1+3<1,1+4<2,*2+4<3,*2+1<1,3+1>2,*3+3>3},
+*1+3<1,1+4>2,*2+4>3,*2+1<1,3+1>2,*3+3>3},
{% 4
*1+2<1,*1+4<2,2+3<2,*3+1>2,*3+4>3},
{% 5
@@ -2026,8 +2064,8 @@
}%
\global\root@sum@resetfalse%
}%
-\xdef\my@root@sum{}%
-\xdef\my@fixed@root@sum{}%
+\xdef\lie@hasse@root@sum{}%
+\xdef\lie@hasse@fixed@root@sum{}%
\NewDocumentCommand\rootSum{oommm}%
{%
\IfValueT{#1}%
@@ -2053,15 +2091,15 @@
\fi%
\IfStrEqCase{\dynkin@series}%
{%
- {A}{\hasse@A@root@sum{#3}{#4}{\my@root@sum}}%
- {B}{\hasse@B@root@sum{#3}{#4}{\my@root@sum}}%
- {C}{\hasse@C@root@sum{#3}{#4}{\my@root@sum}}%
- {D}{\hasse@D@root@sum{#3}{#4}{\my@root@sum}}%
- {E}{\xdef\my@root@sum{\exceptional@root@sum{#3;#4}}}%
- {F}{\xdef\my@root@sum{\exceptional@root@sum{#3;#4}}}%
- {G}{\xdef\my@root@sum{\exceptional@root@sum{#3;#4}}}%
+ {A}{\hasse@A@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {B}{\hasse@B@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {C}{\hasse@C@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {D}{\hasse@D@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {E}{\xdef\lie@hasse@root@sum{\exceptional@root@sum{#3;#4}}}%
+ {F}{\xdef\lie@hasse@root@sum{\exceptional@root@sum{#3;#4}}}%
+ {G}{\xdef\lie@hasse@root@sum{\exceptional@root@sum{#3;#4}}}%
}%
- \StrSubstitute{\my@root@sum}{.}{,}[#5]%
+ \StrSubstitute{\lie@hasse@root@sum}{.}{,}[#5]%
}%
%% \rootSystemHeight[G][2]{\h} sets the counter \h to the height of the poset
%% of the root system G2. \rootSystemHeight{\h} uses the current root system.
@@ -2451,7 +2489,7 @@
4;1=3.1,%
5;1=3.2}%
}%
-\NewDocumentCommand\forAllPositiveRootsInHasseDiagram{m}%
+\NewDocumentCommand\forAllPositiveRoots{m}%
{%
\rootSystemHeight{\lie@hasse@height}%
\foreach \root@grady in {1,...,\the\lie@hasse@height}%