summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-04 03:04:17 +0000
committerNorbert Preining <norbert@preining.info>2023-09-04 03:04:17 +0000
commit6cc1e9947e6e547a181fd0510d399af947c7bbc9 (patch)
treef10ff1c91dcd60c85ba8e881b24b09911827a28a /graphics/pgf
parent59b528f442538943e1d34291a905464d987035ee (diff)
CTAN sync 202309040304
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/contrib/rank-2-roots/README4
-rw-r--r--graphics/pgf/contrib/rank-2-roots/rank-2-roots.pdfbin448699 -> 448000 bytes
-rw-r--r--graphics/pgf/contrib/rank-2-roots/rank-2-roots.sty265
-rw-r--r--graphics/pgf/contrib/rank-2-roots/rank-2-roots.tex306
4 files changed, 318 insertions, 257 deletions
diff --git a/graphics/pgf/contrib/rank-2-roots/README b/graphics/pgf/contrib/rank-2-roots/README
index 91a7c6417b..116783e3b3 100644
--- a/graphics/pgf/contrib/rank-2-roots/README
+++ b/graphics/pgf/contrib/rank-2-roots/README
@@ -2,9 +2,9 @@ ___________________________________
Rank 2 roots
- v1.1
+ v1.2
- 31 August 2023
+ 03 September 2023
___________________________________
Authors : Ben McKay
diff --git a/graphics/pgf/contrib/rank-2-roots/rank-2-roots.pdf b/graphics/pgf/contrib/rank-2-roots/rank-2-roots.pdf
index c9049e354f..3a50f63c76 100644
--- a/graphics/pgf/contrib/rank-2-roots/rank-2-roots.pdf
+++ b/graphics/pgf/contrib/rank-2-roots/rank-2-roots.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/rank-2-roots/rank-2-roots.sty b/graphics/pgf/contrib/rank-2-roots/rank-2-roots.sty
index bc492919e4..5bc64f1884 100644
--- a/graphics/pgf/contrib/rank-2-roots/rank-2-roots.sty
+++ b/graphics/pgf/contrib/rank-2-roots/rank-2-roots.sty
@@ -2,7 +2,7 @@
%
% The Rank 2 Roots package.
%
-% Version 1.1
+% Version 1.2
%
%
% This package draws root and weight lattices for rank 2 root systems in LaTeX documents,
@@ -19,7 +19,7 @@
%
%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{rank-2-roots}[2023/08/31 Rank 2 roots]
+\ProvidesPackage{rank-2-roots}[2023/09/03 Rank 2 roots]
\RequirePackage{tikz}
\RequirePackage{xstring}
\RequirePackage{xparse}
@@ -47,16 +47,31 @@ fadings
\setlength\weightLength{.5cm}
\newlength\gradingDot
\setlength\gradingDot{2pt}
-\tikzstyle{weight lattice}=[gray!40]
-\tikzstyle{root}=[gray]
-\tikzstyle{root polygon}=[gray!40,opacity=.5]
-\tikzstyle{hyperplane}=[gray!50,fill opacity=.5]
-\tikzstyle{Weyl chamber}=[gray!60,fill opacity=.5]
-\tikzstyle{grading}=[line width=3pt,gray,opacity=0.5,line cap=round]
-
\def\defaultWeightLatticeSize{0}
+\newlength\simple@root@radius
+\setlength\simple@root@radius{1.2pt}
+\def\weight@multiplicity{1}
\newif\ifAutoSizeWeightLattice
\AutoSizeWeightLatticetrue
+\pgfkeys{/root system/.is family,
+/root system,
+weight lattice/.style={draw=gray!40},
+root polygon/.style={gray!40,opacity=.5},
+hyperplane/.style={gray!50,fill opacity=.5},
+Weyl chamber/.style={gray!60,fill opacity=.5},
+grading/.style={line width=3pt,gray,opacity=0.5,line cap=round},
+weight radius/.code={\pgfmathsetlength\weightRadius{#1}},
+weight length/.code={\pgfmathsetlength\weightLength{#1}},
+grading dot radius/.code={\pgfmathsetlength\gradingDot{#1}},
+simple root radius/.code={\pgfmathsetlength\simple@root@radius{#1}},
+weight/.style={fill=gray,draw=white},
+root/.style={fill=gray,draw=white},
+simple root/.style={fill=white,draw=gray},
+fundamental weight/.style={fill=black,draw=gray},
+multiplicity/.estore in = \weight@multiplicity,
+multiplicity/.default = 1,
+.search also={/tikz},
+}
\makeatletter
\def\root@system{?}
@@ -93,14 +108,15 @@ fadings
\pgf@y=\pgfmathresult pt%
}
-\NewDocumentEnvironment{rootSystem}{m}%
+\NewDocumentEnvironment{rootSystem}{O{}m}%
{%
\xdef\weight@lattice@size{\defaultWeightLatticeSize}%
-\IfSubStr{ABCG}{#1}{}{\unrecognized@root@system{#1}}%
-\xdef\root@system{#1}%
+\IfSubStr{ABCG}{#2}{}{\unrecognized@root@system{#2}}%
+\xdef\root@system{#2}%
\check@root@system{}%
\choose@weight@lattice{}%
\choose@root@lattice{}%
+\pgfkeys{/root system,#1}%
}%
{%
\IfStrEq{\weight@lattice@size}{0}%%
@@ -116,7 +132,10 @@ fadings
}%
\NewDocumentCommand\simpleroots{}%
-{\rt[black]{1}{0}\rt[black]{0}{1}}
+{\rt[simple root]{1}{0}\rt[simple root]{0}{1}}
+
+\NewDocumentCommand\fundamentalweights{}%
+{\wt[fundamental weight]{1}{0}\wt[fundamental weight]{0}{1}}
\NewDocumentCommand\choose@root@lattice{}
{%
@@ -132,17 +151,17 @@ fadings
\NewDocumentCommand\A@root{mm}% x,y in units of simple roots
{%
-(hex cs:x={(2*(#1)-(#2))},y={(-(#1)+2*(#2))})%
+(hex cs:x={(-(#1)+2*(#2))},y={(2*(#1)-(#2))})%
}%
\NewDocumentCommand\B@root{mm}% x,y in units of simple roots
{%
-(square cs:x={((#1)-(#2))},y=#2)%
+(square cs:x={((#1))},y={(-(#1)+(#2))})%
}%
\NewDocumentCommand\C@root{mm}% x,y in units of simple roots
{%
-(square cs:x={(2*(#1)-(#2))},y={#2})%
+(square cs:x={(2*(#2)-(#1))},y={#1})%
}%
\NewDocumentCommand\G@root{mm}% x,y in units of simple roots
@@ -150,21 +169,6 @@ fadings
(hex cs:x={(-(#1)+(#2))},y={(2*(#1)-(#2))})%
}%
-\NewDocumentCommand\rt{O{}mm}%[tikz options,multiplicity=???]{x}{y}
-{%
-\check@root@system%
-\pgfkeys{/weight, default, #1}%
-\IfStrEq{\weight@multiplicity}{1}{}%
-{%%%
-\foreach \i in {2,...,\weight@multiplicity}%
-{%
-\draw[/weight,weight,#1,fill=none] \Root{#2}{#3} circle ({\i*\weightRadius});%
-}%
-}%%%
-\fill[/weight,weight,#1] \Root{#2}{#3} circle (\weightRadius);%
-%}%%
-}%
-
\NewDocumentCommand\unrecognized@root@system{m}%
{%
\ClassError{Rank 2 roots}{Unrecognized root system: ``#1''. Allowed values are A,B,C,G}{}%
@@ -196,19 +200,19 @@ fadings
{%
\check@root@system%
\begin{scope}[on background layer]%
-\draw[weight lattice,step=\weightLength,#1]
+\draw[/root system/weight lattice,step=\weightLength,#1]
({-\weight@lattice@size*\weightLength},{-\weight@lattice@size*\weightLength})
grid
({\weight@lattice@size*\weightLength},{\weight@lattice@size*\weightLength});%
\foreach \i in {-\weight@lattice@size,...,\weight@lattice@size}%
{%
-\draw[weight lattice,#1] ({\weightLength*\i},{\weightLength*\weight@lattice@size})
+\draw[/root system/weight lattice,#1] ({\weightLength*\i},{\weightLength*\weight@lattice@size})
-- ({\weightLength*\weight@lattice@size},{\weightLength*\i});%
-\draw[weight lattice,#1] ({-\weightLength*\weight@lattice@size},{\weightLength*\i})
+\draw[/root system/weight lattice,#1] ({-\weightLength*\weight@lattice@size},{\weightLength*\i})
-- ({\weightLength*\i},{-\weightLength*\weight@lattice@size});%
-\draw[weight lattice,#1] ({-\weightLength*\i},{\weightLength*\weight@lattice@size})
+\draw[/root system/weight lattice,#1] ({-\weightLength*\i},{\weightLength*\weight@lattice@size})
-- ({-\weightLength*\weight@lattice@size},{\weightLength*\i});%
-\draw[weight lattice,#1] ({\weightLength*\weight@lattice@size},{\weightLength*\i})
+\draw[/root system/weight lattice,#1] ({\weightLength*\weight@lattice@size},{\weightLength*\i})
-- ({-\weightLength*\i},{-\weightLength*\weight@lattice@size});%
}%
\end{scope}%
@@ -219,7 +223,6 @@ fadings
\B@weight@lattice[#1]%
}%
-
\NewDocumentCommand\weightLattice{O{}m}%
{%
\check@root@system%
@@ -238,29 +241,63 @@ fadings
\NewDocumentCommand\hexwt{O{}mm}%
{%
\check@root@system%
-\pgfkeys{/weight, default, #1}%
+\pgfkeys{/root system,#1}%
\IfStrEq{\weight@multiplicity}{1}{}%
{%%%
\foreach \i in {2,...,\weight@multiplicity}%
{%
-\draw[/weight,weight,#1,fill=none] (hex cs:x=#2,y=#3) circle ({\i*\weightRadius});%
+\draw[/root system,weight,#1,fill=none] (hex cs:x=#2,y=#3) circle ({\i*\weightRadius});%
}%
+\gdef\weight@multiplicity{1}%
}%%%
-\fill[/weight,weight,#1] (hex cs:x=#2,y=#3) circle (\weightRadius);%
+\fill[/root system,weight,#1] (hex cs:x=#2,y=#3) circle (\weightRadius);%
}%
\NewDocumentCommand\squarewt{O{}mm}%
{%
\check@root@system%
-\pgfkeys{/weight, default, #1}%
+\pgfkeys{/root system,weight,#1}%
+\IfStrEq{\weight@multiplicity}{1}{}%
+{%%%
+\foreach \i in {2,...,\weight@multiplicity}%
+{%
+\draw[/root system,weight,#1,fill=none] (square cs:x=#2,y=#3) circle ({\i*\weightRadius});%
+}%
+\gdef\weight@multiplicity{1}%
+}%%%
+\fill[/root system,weight,#1] (square cs:x=#2,y=#3) circle (\weightRadius);%
+}%
+
+\NewDocumentCommand\rt{O{}mm}%[tikz options,multiplicity=???]{x}{y}
+{%
+\check@root@system%
+\pgfkeys{/root system,weight,#1}%
+\IfStrEq{\weight@multiplicity}{1}{}%
+{%%%
+\foreach \i in {2,...,\weight@multiplicity}%
+{%
+\draw[/root system,weight,#1,fill=none] \Root{#2}{#3} circle ({\i*\weightRadius});%
+}%
+\gdef\weight@multiplicity{1}%
+}%%%
+\fill[/root system,weight,#1] \Root{#2}{#3} circle (\weightRadius);%
+%}%%
+}%
+
+\NewDocumentCommand\wt{O{}mm}%[tikz options,multiplicity=???]{x}{y}
+{%
+\check@root@system%
+\pgfkeys{/root system,weight,#1}%
\IfStrEq{\weight@multiplicity}{1}{}%
{%%%
\foreach \i in {2,...,\weight@multiplicity}%
{%
-\draw[/weight,weight,#1,fill=none] (square cs:x=#2,y=#3) circle ({\i*\weightRadius});%
+\draw[/root system,weight,#1,fill=none] \weight{#2}{#3} circle ({\i*\weightRadius});%
}%
+\gdef\weight@multiplicity{1}%
}%%%
-\fill[/weight,weight,#1] (square cs:x=#2,y=#3) circle (\weightRadius);%
+\fill[/root system,weight,#1] \weight{#2}{#3} circle (\weightRadius);%
+%}%%
}%
\newif\if@decimals
@@ -322,38 +359,10 @@ fadings
}%%
}%
-
-\def\weight@multiplicity{1}
-\pgfkeys{
-/weight/.is family,
-/weight,
-weight/.style = {fill=gray,draw=gray},
- default/.style = {
- multiplicity/.estore in = \weight@multiplicity,
- multiplicity = 1,
- },
- .search also={/tikz},
-}
-
-\NewDocumentCommand\wt{O{}mm}%[tikz options,multiplicity=???]{x}{y}
-{%
-\check@root@system%
-\pgfkeys{/weight, default, #1}%
-\IfStrEq{\weight@multiplicity}{1}{}%
-{%%%
-\foreach \i in {2,...,\weight@multiplicity}%
-{%
-\draw[/weight,weight,#1,fill=none] \weight{#2}{#3} circle ({\i*\weightRadius});%
-}%
-}%%%
-\fill[/weight,weight,#1] \weight{#2}{#3} circle (\weightRadius);%
-%}%%
-}%
-
\NewDocumentCommand\A@roots{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[root polygon]
+\fill[/root system/root polygon]
(hex cs:x=1,y=1) --
(hex cs:x=-1,y=2) --
(hex cs:x=-2,y=1) --
@@ -373,7 +382,7 @@ cycle;%
\NewDocumentCommand\B@roots{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[root polygon]
+\fill[/root system/root polygon]
(square cs:x=-1,y=-1) --
(square cs:x=-1,y=1) --
(square cs:x=1,y=1) --
@@ -401,7 +410,7 @@ cycle;%
\NewDocumentCommand\C@roots{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[root polygon]
+\fill[/root system/root polygon]
(square cs:x=2,y=0) --
(square cs:x=0,y=2) --
(square cs:x=-2,y=0) --
@@ -421,7 +430,7 @@ cycle;%
\NewDocumentCommand\G@roots{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[root polygon]
+\fill[/root system/root polygon]
(hex cs:x=1,y=0) --
(hex cs:x=1,y=1) --
(hex cs:x=0,y=1) --
@@ -488,10 +497,10 @@ cycle;%
\begin{scope}[on background layer]
\IfStrEqCase{\root@system}%
{%%
-{A}{\fill[Weyl chamber,#1] \weight{0}{#2} -- \weight{0}{0} -- \weight{#2}{0} --cycle;}%
-{B}{\fill[Weyl chamber,#1] (square cs:x=#2,y=#2) -- (square cs:x=0,y=0) --(square cs:x=#2,y=0) --cycle;}%
-{C}{\fill[Weyl chamber,#1] (square cs:x=#2,y=#2) -- (square cs:x=0,y=0) --(square cs:x=#2,y=0) --cycle;}%
-{G}{\fill[Weyl chamber,#1] (hex cs:x={(.5*#2)},y={(.5*#2)}) -- (hex cs:x=0,y=0) --(hex cs:x=#2,y=0) --cycle;}%
+{A}{\fill[/root system/Weyl chamber,#1] \weight{0}{#2} -- \weight{0}{0} -- \weight{#2}{0} --cycle;}%
+{B}{\fill[/root system/Weyl chamber,#1] (square cs:x=#2,y=#2) -- (square cs:x=0,y=0) --(square cs:x=#2,y=0) --cycle;}%
+{C}{\fill[/root system/Weyl chamber,#1] (square cs:x=#2,y=#2) -- (square cs:x=0,y=0) --(square cs:x=0,y=#2) --cycle;}%
+{G}{\fill[/root system/Weyl chamber,#1] (hex cs:x={(.5*#2)},y={(.5*#2)}) -- (hex cs:x=0,y=0) --(hex cs:x=#2,y=0) --cycle;}%
}%%
[\check@root@system]%
\end{scope}
@@ -502,16 +511,15 @@ cycle;%
\begin{scope}[on background layer]
\IfStrEqCase{\root@system}%
{%%
-{A}{\fill[Weyl chamber,#1] (hex cs:x=0,y=1.5) -- (hex cs:x=0,y=0) -- (hex cs:x=1.5,y=0) -- (hex cs:x=1,y=1) -- cycle;}%
-{B}{\fill[Weyl chamber,#1] (square cs:x=1,y=1) -- (square cs:x=0,y=0) --(square cs:x=1,y=0) --cycle;}%
-{C}{\fill[Weyl chamber,#1] (square cs:x=1,y=1) -- (square cs:x=0,y=0) --(square cs:x=2,y=0) --cycle;}%
-{G}{\fill[Weyl chamber,#1] (hex cs:x=1,y=1) -- (hex cs:x=0,y=0) --(hex cs:x=1,y=0) --cycle;}%
+{A}{\fill[/root system/Weyl chamber,#1] (hex cs:x=0,y=1.5) -- (hex cs:x=0,y=0) -- (hex cs:x=1.5,y=0) -- (hex cs:x=1,y=1) -- cycle;}%
+{B}{\fill[/root system/Weyl chamber,#1] (square cs:x=1,y=1) -- (square cs:x=0,y=0) --(square cs:x=1,y=0) --cycle;}%
+{C}{\fill[/root system/Weyl chamber,#1] (square cs:x=1,y=1) -- (square cs:x=0,y=0) --(square cs:x=2,y=0) --cycle;}%
+{G}{\fill[/root system/Weyl chamber,#1] (hex cs:x=1,y=1) -- (hex cs:x=0,y=0) --(hex cs:x=1,y=0) --cycle;}%
}%%
[\check@root@system]%
\end{scope}
}%
-
\NewDocumentCommand\WeylChamber{O{}}%
{%
\check@root@system%
@@ -539,10 +547,10 @@ cycle;%
\tikzdeclarecoordinatesystem{B weight}%
{%
\setkeys{Bkeys}{#1}%
-\ifAutoSizeWeightLattice\auto@stretch@square{(\myx+.5*(\myy))}{(.5*(\myy))}\fi%
-\pgfmathparse{((\myx)+.5*(\myy))*\weightLength}%
+\ifAutoSizeWeightLattice\auto@stretch@square{(\myy+.5*(\myx))}{(.5*(\myx))}\fi%
+\pgfmathparse{((\myy)+.5*(\myx))*\weightLength}%
\pgf@x=\pgfmathresult pt%
-\pgfmathparse{.5*(\myy)*\weightLength}%
+\pgfmathparse{.5*(\myx)*\weightLength}%
\pgf@y=\pgfmathresult pt%
}
@@ -557,10 +565,10 @@ cycle;%
\tikzdeclarecoordinatesystem{C weight}%
{%
\setkeys{Ckeys}{#1}%
-\ifAutoSizeWeightLattice\auto@stretch@square{(\myx+\myy)}{(\myy)}\fi%
-\pgfmathparse{(\myx+\myy)*\weightLength}%
+\ifAutoSizeWeightLattice\auto@stretch@square{(\myx+\myy)}{(\myx)}\fi%
+\pgfmathparse{\myx*\weightLength}%
\pgf@x=\pgfmathresult pt%
-\pgfmathparse{\myy*\weightLength}%
+\pgfmathparse{(\myx+\myy)*\weightLength}%
\pgf@y=\pgfmathresult pt%
}
@@ -576,7 +584,7 @@ cycle;%
\NewDocumentCommand\draw@hex@grid@line{O{}mmmm}%
{%
-\draw[weight lattice,#1] (hex cs:x=#2,y=#3) -- (hex cs:x=#4,y=#5);%
+\draw[/root system/weight lattice,#1] (hex cs:x=#2,y=#3) -- (hex cs:x=#4,y=#5);%
}%
\NewDocumentCommand\hexgrid{O{}m}%
@@ -624,23 +632,23 @@ cycle;%
\NewDocumentCommand\A@positive@root@hyperplane{O{}}%
{%
\begin{scope}[on background layer]
-\fill[hyperplane,#1] (hex cs:x=-1.5,y=1.5) --(hex cs:x=-1,y=2) --(hex cs:x=1,y=1) --(hex cs:x=2,y=-1) --(hex cs:x=1.5,y=-1.5) --cycle;%
+\fill[/root system/hyperplane,#1] (hex cs:x=-1.5,y=1.5) --(hex cs:x=-1,y=2) --(hex cs:x=1,y=1) --(hex cs:x=2,y=-1) --(hex cs:x=1.5,y=-1.5) --cycle;%
\end{scope}
}%
-
\NewDocumentCommand\B@positive@root@hyperplane{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (square cs:x=-1,y=.5) -- (square cs:x=-1,y=1) -- (square cs:x=1,y=1) -- (square cs:x=1,y=-.5) -- cycle;%
+\fill[/root system/hyperplane,#1]
+(square cs:x=-.5,y=1) -- (square cs:x=1,y=1) -- (square cs:x=1,y=-1) -- (square cs:x=.5,y=-1) -- cycle;%
+%(square cs:x=-1,y=.5) -- (square cs:x=-1,y=1) -- (square cs:x=1,y=1) -- (square cs:x=1,y=-.5) -- cycle;%
\end{scope}%
}%
-
\NewDocumentCommand\C@positive@root@hyperplane{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (square cs:x=-1.5,y=.5) -- (square cs:x=0,y=2) -- (square cs:x=2,y=0) -- (square cs:x=1.5,y=-.5) -- cycle;%
+\fill[/root system/hyperplane,#1] (square cs:x=-1.5,y=.5) -- (square cs:x=0,y=2) -- (square cs:x=2,y=0) -- (square cs:x=1.5,y=-.5) -- cycle;%
\end{scope}%
}%
@@ -648,7 +656,7 @@ cycle;%
\NewDocumentCommand\G@positive@root@hyperplane{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1]
+\fill[/root system/hyperplane,#1]
(hex cs:x=-1,y=1.5) --
(hex cs:x=-1,y=2) --
(hex cs:x=0,y=1) --
@@ -675,28 +683,28 @@ cycle;%
\NewDocumentCommand\A@parabolic@one{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (hex cs:x=-2,y=1) -- (hex cs:x=-1,y=2) -- (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1) -- cycle;%
+\fill[/root system/hyperplane,#1] (hex cs:x=-2,y=1) -- (hex cs:x=-1,y=2) -- (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1) -- cycle;%
\end{scope}%
}%
\NewDocumentCommand\A@parabolic@two{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (hex cs:x=-1,y=2) -- (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1) -- (hex cs:x=1,y=-2) -- cycle;%
+\fill[/root system/hyperplane,#1] (hex cs:x=-1,y=2) -- (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1) -- (hex cs:x=1,y=-2) -- cycle;%
\end{scope}%
}%
\NewDocumentCommand\B@parabolic@one{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (square cs:x=-1,y=0) --(square cs:x=-1,y=1) --(square cs:x=1,y=1) --(square cs:x=1,y=0) --cycle;%
+\fill[/root system/hyperplane,#1] (square cs:x=0,y=-1) --(square cs:x=1,y=-1) --(square cs:x=1,y=1) --(square cs:x=0,y=1) --cycle;%
\end{scope}%
}%
\NewDocumentCommand\B@parabolic@two{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (square cs:x=-1,y=1) --(square cs:x=1,y=-1) --(square cs:x=1,y=1) --cycle;%
+\fill[/root system/hyperplane,#1] (square cs:x=-1,y=1) --(square cs:x=1,y=-1) --(square cs:x=1,y=1) --cycle;%
\end{scope}%
}%
@@ -704,7 +712,7 @@ cycle;%
\NewDocumentCommand\C@parabolic@one{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (square cs:x=-2,y=0) -- (square cs:x=0,y=2) -- (square cs:x=2,y=0) -- cycle;%
+\fill[/root system/hyperplane,#1] (square cs:x=-2,y=0) -- (square cs:x=0,y=2) -- (square cs:x=2,y=0) -- cycle;%
\end{scope}%
}%
@@ -712,7 +720,7 @@ cycle;%
\NewDocumentCommand\C@parabolic@two{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (square cs:x=-1,y=1) -- (square cs:x=0,y=2) -- (square cs:x=2,y=0) -- (square cs:x=1,y=-1) -- cycle;%
+\fill[/root system/hyperplane,#1] (square cs:x=-1,y=1) -- (square cs:x=0,y=2) -- (square cs:x=2,y=0) -- (square cs:x=1,y=-1) -- cycle;%
\end{scope}%
}%
@@ -720,7 +728,7 @@ cycle;%
\NewDocumentCommand\G@parabolic@one{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (hex cs:x=-1,y=1) -- (hex cs:x=-1,y=2) -- (hex cs:x=0,y=1) -- (hex cs:x=1,y=1) -- (hex cs:x=1,y=0) -- (hex cs:x=2,y=-1) -- (hex cs:x=1,y=-1) -- cycle;%
+\fill[/root system/hyperplane,#1] (hex cs:x=-1,y=1) -- (hex cs:x=-1,y=2) -- (hex cs:x=0,y=1) -- (hex cs:x=1,y=1) -- (hex cs:x=1,y=0) -- (hex cs:x=2,y=-1) -- (hex cs:x=1,y=-1) -- cycle;%
\end{scope}%
}%
@@ -728,7 +736,7 @@ cycle;%
\NewDocumentCommand\G@parabolic@two{O{}}%
{%
\begin{scope}[on background layer]%
-\fill[hyperplane,#1] (hex cs:x=-1,y=2) --(hex cs:x=0,y=1) --(hex cs:x=1,y=1) --(hex cs:x=1,y=0) --(hex cs:x=2,y=-1) --(hex cs:x=1,y=-1) --(hex cs:x=1,y=-2) --cycle;%
+\fill[/root system/hyperplane,#1] (hex cs:x=-1,y=2) --(hex cs:x=0,y=1) --(hex cs:x=1,y=1) --(hex cs:x=1,y=0) --(hex cs:x=2,y=-1) --(hex cs:x=1,y=-1) --(hex cs:x=1,y=-2) --cycle;%
\end{scope}%
}%
@@ -757,17 +765,19 @@ cycle;%
{%
\IfStrEqCase{\root@system\parabolic@subalgebra}%
{%%
-{A1}{\draw[grading] (hex cs:x=-1,y=2) -- (hex cs:x=1,y=1);}%
-{A2}{\draw[grading] (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1);}%
-{A3}{\draw[grading] (hex cs:x=-1,y=2) -- (hex cs:x=2,y=-1);\draw[grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=0);}%
-{B1}{\draw[grading] (square cs:x=-1,y=1) -- (square cs:x=1,y=1);}%
-{B2}{\draw[grading] (square cs:x=0,y=1) -- (square cs:x=1,y=0);\draw[grading] (square cs:x=1,y=1) circle (\gradingDot);}%
-{B3}{\draw[grading] (square cs:x=-1,y=1) -- (square cs:x=1,y=0);%
-\draw[grading] (square cs:x=0,y=1) -- (square cs:x=1,y=.5);%
-\draw[grading] (square cs:x=1,y=1) circle (\gradingDot);}%
-{C1}{\draw[grading] (square cs:x=-2,y=1) -- (square cs:x=2,y=1);%
-\draw[grading] (square cs:x=-2,y=2) -- (square cs:x=2,y=2);}%
-{C2}{\draw[grading] (square cs:x=0,y=2) -- (square cs:x=2,y=0);}%
+{A1}{\draw[/root system/grading] (hex cs:x=-1,y=2) -- (hex cs:x=1,y=1);}%
+{A2}{\draw[/root system/grading] (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1);}%
+{A3}{\draw[/root system/grading] (hex cs:x=-1,y=2) -- (hex cs:x=2,y=-1);%
+\draw[/root system/grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=0);}%
+{B1}{\draw[/root system/grading] (square cs:x=1,y=-1) -- (square cs:x=1,y=1);}%
+{B2}{\draw[/root system/grading] (square cs:x=0,y=1) -- (square cs:x=1,y=0);%
+\draw[/root system/grading] (square cs:x=1,y=1) circle (\gradingDot);}%
+{B3}{\draw[/root system/grading] (square cs:x=1,y=-1) -- (square cs:x=0,y=1);%
+\draw[/root system/grading] (square cs:x=1,y=0) -- (square cs:x=.5,y=1);%
+\draw[/root system/grading] (square cs:x=1,y=1) circle (\gradingDot);}%
+{C1}{\draw[/root system/grading] (square cs:x=-2,y=1) -- (square cs:x=2,y=1);%
+\draw[/root system/grading] (square cs:x=-2,y=2) -- (square cs:x=2,y=2);}%
+{C2}{\draw[/root system/grading] (square cs:x=0,y=2) -- (square cs:x=2,y=0);}%
{C3}{
\begin{scope}
\clip
@@ -776,31 +786,32 @@ cycle;%
(square cs:x=2,y=-2) --
(square cs:x=-2,y=-2) --
cycle;
-\draw[grading] (square cs:x=0,y=2) -- (square cs:x=2,y=1.333333);
-\draw[grading] (square cs:x=-2,y=1.3333333) -- (square cs:x=2,y=0);
-\draw[grading] (square cs:x=-2,y=2) -- (square cs:x=2,y=.666666);
+\draw[/root system/grading] (square cs:x=0,y=2) -- (square cs:x=2,y=1.333333);
+\draw[/root system/grading] (square cs:x=-2,y=1.3333333) -- (square cs:x=2,y=0);
+\draw[/root system/grading] (square cs:x=-2,y=2) -- (square cs:x=2,y=.666666);
\end{scope}
}%
-{G1}{\draw[grading] (hex cs:x=-1,y=2) -- (hex cs:x=2,y=-1);\draw[grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=0);}%
+{G1}{\draw[/root system/grading] (hex cs:x=-1,y=2) -- (hex cs:x=2,y=-1);%
+\draw[/root system/grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=0);}%
{G2}{\begin{scope}[on background layer]
\IfStrEq{\weight@lattice@size}{0}%
{%
-\draw[grading] (square cs:x=1.5,y=\sqrt@three) -- (square cs:x=1.5,y=-\sqrt@three);
-\draw[grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=-2);
-\draw[grading] (hex cs:x=-.5,y=2) -- (hex cs:x=1.5,y=-2);
+\draw[/root system/grading] (square cs:x=1.5,y=\sqrt@three) -- (square cs:x=1.5,y=-\sqrt@three);
+\draw[/root system/grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=-2);
+\draw[/root system/grading] (hex cs:x=-.5,y=2) -- (hex cs:x=1.5,y=-2);
}%
{%
\hexclip
-\draw[grading] (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1);
-\draw[grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=-2);
-\draw[grading] (hex cs:x=-.5,y=2) -- (hex cs:x=1.5,y=-2);
+\draw[/root system/grading] (hex cs:x=1,y=1) -- (hex cs:x=2,y=-1);
+\draw[/root system/grading] (hex cs:x=0,y=2) -- (hex cs:x=2,y=-2);
+\draw[/root system/grading] (hex cs:x=-.5,y=2) -- (hex cs:x=1.5,y=-2);
}%
\end{scope}}%
{G3}{\begin{scope}[on background layer]
\IfStrEq{\weight@lattice@size}{0}{}{\hexclip}%
\foreach \i in {1,...,5}%
{%
-\draw[grading]
+\draw[/root system/grading]
(square cs:x={.333333333*(\i-1)},y=\sqrt@three) --
(square cs:x={.333333333*(\i+1)},y=-\sqrt@three);
}%
diff --git a/graphics/pgf/contrib/rank-2-roots/rank-2-roots.tex b/graphics/pgf/contrib/rank-2-roots/rank-2-roots.tex
index 25b9b585f0..69fe728949 100644
--- a/graphics/pgf/contrib/rank-2-roots/rank-2-roots.tex
+++ b/graphics/pgf/contrib/rank-2-roots/rank-2-roots.tex
@@ -2,7 +2,7 @@
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
-\title{The Rank 2 Roots Package \\ Version 1.1}
+\title{The Rank 2 Roots Package \\ Version 1.2}
\makeatletter
\DeclareRobustCommand{\scotsMc}{\scotsMcx{c}}
@@ -22,7 +22,7 @@
\author{Benjamin \scotsMc{}Kay}
\address{School of Mathematical Sciences, University College Cork, Cork, Ireland}
\email{b.mckay@ucc.ie}
-\date{31 August 2023}
+\date{3 September 2023}
\usepackage{etoolbox}
\usepackage{lmodern}
@@ -71,12 +71,10 @@ before upper={\widowpenalties=3 10000 10000 150}}
\begin{document}
\maketitle
\tableofcontents
-
\section{Introduction}
This package concerns mathematical drawings arising in representation theory.
The purpose of this package is to ease drawing of rank 2 root systems, with Weyl chambers, weight lattices, and parabolic subgroups, mostly imitating the drawings of Fulton and Harris \cite{Fulton.Harris:1991}.
We use definitions of root systems and weight lattices as in Carter \cite{Carter:2005} p. 540--609.
-
\begin{tcolorbox}[title={Load the \texttt{rank-2-roots} package}]
\begin{verbatim}
\documentclass{amsart}
@@ -91,9 +89,6 @@ The root system \(G_2\):
\end{document}
\end{verbatim}
\end{tcolorbox}
-
-
-
\section{Root systems}
\NewDocumentCommand\drawroots{m}%
{%
@@ -103,11 +98,8 @@ The root system \(G_2\):
\end{rootSystem}
\end{tikzpicture}
}%
-
\NewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -115,10 +107,7 @@ The root system \(G_2\):
\texttt{\detokenize{\roots}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
-
\newcommand*\mytablecontents{}
\foreach \i in {A,B,C,G}{
\xappto\mytablecontents{$\i_2$ & \drawroots{\i} & \csdrawroots{\i}
@@ -149,8 +138,6 @@ The root system \(G_2\):
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -158,8 +145,6 @@ The root system \(G_2\):
\texttt{\detokenize{\simpleroots}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\begin{longtable}{rcm{8cm}}
@@ -173,7 +158,21 @@ The root system \(G_2\):
\mytablecontents
\end{longtable}
-
+\begingroup
+To change the style of the simple roots:
+\[
+\verb!\pgfkeys{/root system/simple root/.style=black}!
+\]
+\pgfkeys{/root system/simple root/.style=black}
+\[
+\begin{tikzpicture}[baseline=-.5]
+\begin{rootSystem}{G}
+\roots
+\simpleroots
+\end{rootSystem}
+\end{tikzpicture}
+\]
+\endgroup
\section{Weights}
Type \verb!\wt{x}{y}! to get a weight at position \((x,y)\) (as measured in a basis of \emph{fundamental weights}).
@@ -185,6 +184,7 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\begin{tikzpicture}[baseline=-.5]
\begin{rootSystem}{#1}
\roots
+\simpleroots
\wt[brown]{1}{0}
\wt[red]{0}{1}
\wt[multiplicity=4,blue]{1}{3}
@@ -196,12 +196,12 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
\par\noindent%
+\texttt{\detokenize{\simpleroots}}%
+\par\noindent%
\texttt{\detokenize{\wt[brown]{1}{0}}}%
\par\noindent%
\texttt{\detokenize{\wt[red]{0}{1}}}%
@@ -213,8 +213,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\texttt{\detokenize{\wt[blue]{-1}{3}}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -235,7 +233,117 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\mytablecontents
\end{longtable}
+{
+\pgfkeys{/root system/weight length=.75cm}
+\begin{longtable}{rcm{10cm}}
+\caption{The fundamental weights and the simple roots}\\
+\endfirsthead
+\caption{\dots continued}\\
+\endhead
+\multicolumn{3}{c}{continued \dots}\\
+\endfoot
+\endlastfoot
+$A_2$&
+\begin{tikzpicture}[baseline=-.5]
+\begin{rootSystem}{A}
+\roots
+\simpleroots
+\node [above] at \Root {1}{0} {\(\alpha_1\)};
+\node [right] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [right] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}
+\end{tikzpicture}
+&
+\begin{verbatim}
+\begin{rootSystem}{A}
+\roots
+\simpleroots
+\node [above] at \Root {1}{0} {\(\alpha_1\)};
+\node [right] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [right] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}
+\end{verbatim}
+\\
+$B_2$&
+\begin{tikzpicture}[baseline=-.5]
+\begin{rootSystem}{B}
+\roots
+\simpleroots
+\node [below] at \Root {1}{0} {\(\alpha_1\)};
+\node [above] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [right] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}{B}
+\end{tikzpicture}
+&
+\begin{verbatim}
+\begin{rootSystem}{B}
+\roots
+\simpleroots
+\node [below] at \Root {1}{0} {\(\alpha_1\)};
+\node [above] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [right] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}{B}
+\end{verbatim}
+\\
+$C_2$&
+\begin{tikzpicture}[baseline=-.5]
+\begin {rootSystem}{C}
+\roots
+\simpleroots
+\node [left] at \Root {1}{0} {\(\alpha_1\)};
+\node [right] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [above] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}
+\end{tikzpicture}
+&
+\begin{verbatim}
+\begin{rootSystem}{C}
+\roots
+\simpleroots
+\node [left] at \Root {1}{0} {\(\alpha_1\)};
+\node [right] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [above] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}
+\end{verbatim}
+\\
+$G_2$&
+\begin{tikzpicture}[baseline=-.5]
+\begin{rootSystem}{G}
+\roots
+\simpleroots
+\node [above] at \Root {1}{0} {\(\alpha_1\)};
+\node [below right] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [right] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}
+\end{tikzpicture}
+&
+\begin{verbatim}
+\begin{rootSystem}{G}
+\roots
+\simpleroots
+\node [above] at \Root {1}{0} {\(\alpha_1\)};
+\node [below right] at \Root {0}{1} {\(\alpha_2\)};
+\fundamentalweights
+\node [right] at \weight {1}{0} {\(\omega_1\)};
+\node [right] at \weight {0}{1} {\(\omega_2\)};
+\end{rootSystem}
+\end{verbatim}
+\end{longtable}
\RenewDocumentCommand\drawroots{m}%
{%
@@ -247,10 +355,10 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\end{tikzpicture}
}%
+}
+
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -258,8 +366,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\texttt{\detokenize{\wt[multiplicity=2,root]{0}{0}}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -280,8 +386,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\mytablecontents
\end{longtable}
-
-
\RenewDocumentCommand\drawroots{m}%
{%
\begin{tikzpicture}[baseline=-.5]
@@ -294,8 +398,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -303,8 +405,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\texttt{\detokenize{\WeylChamber}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -340,8 +440,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -349,8 +447,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\texttt{\detokenize{\positiveRootHyperplane}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -384,8 +480,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\RenewDocumentCommand\csdrawroots{mm}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -393,8 +487,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\texttt{\detokenize{\parabolic}\{#2\}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -407,7 +499,7 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
}
\begin{longtable}{rcm{8cm}}
-\caption{Parabolic subgroups. Each set of roots is assigned a number, with each binary digit zero or one to say whether the corresponding root is crossed or not: \(A_{5,37}\) means the parabolic subgroup of \(A_5\) so that the binary digits of \(37=2^5+2^2+2^0\) give us roots \(0,2,5\) in Bourbaki ordering being compact roots, i.e. having the root vectors of both that root and its negative inside the parabolic subgroup. }\\
+\caption{Parabolic subgroups. Each set of roots is assigned a number, with each binary digit zero or one to say whether the corresponding root is crossed or not: \(A_{5,37}\) means the parabolic subgroup of \(A_5\) so that the binary digits of \(37=2^5+2^2+2^0\) give us roots \(0,2,5\) in Bourbaki ordering being crossed roots, i.e. noncompact roots, i.e. having the root vectors of that root but not of its negative inside the parabolic subgroup. }\\
\endfirsthead
\caption{\dots continued}\\
\endhead
@@ -430,8 +522,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\RenewDocumentCommand\csdrawroots{mm}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -441,8 +531,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\texttt{\detokenize{\parabolicgrading}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -493,7 +581,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\end{tikzpicture}
}
-
\tikzstyle{weight arrow}=[black,-stealth,shorten <=.25cm,shorten >=.25cm]
{
@@ -531,8 +618,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\end{tikzpicture}
}
-
-
\begin{tcblisting}{title={Drawing the \(A_2\) root system and a weight at the origin. The option \texttt{root} indicates that this weight is to be coloured like a root.}}
\begin{tikzpicture}
\begin{rootSystem}{A}
@@ -542,7 +627,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\end{tikzpicture}
\end{tcblisting}
-
\begin{tcblisting}{title={Drawing the \(A_2\) root system and a weight at the origin and the positive root hyperplane}}
\begin{tikzpicture}
\begin{rootSystem}{A}
@@ -553,9 +637,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ.
\end{tikzpicture}
\end{tcblisting}
-
-
-
\section{Coordinate systems}
The package provides three coordinate systems: hex, square and weight.
Above we have seen the weight coordinates: a basis of fundamental weights.
@@ -625,10 +706,6 @@ We can use the hex system in drawing on the \(A_2\) or \(G_2\) weight lattices,
\end{tikzpicture}
\end{tcblisting}
-
-
-
-
\begin{tcblisting}{title={Automatic sizing of the weight lattice (the default) \dots}}
\begin{tikzpicture}
\begin{rootSystem}{A}
@@ -693,31 +770,16 @@ We can use the hex system in drawing on the \(A_2\) or \(G_2\) weight lattices,
\end{rootSystem}
\end{tikzpicture}
\end{tcblisting}
+
\begin{tcblisting}{title={Changing the weight length rescales}}
\begin{tikzpicture}
-\setlength\weightLength{.3cm}
+\pgfkeys{/root system/weight length=0.3cm}
\begin{rootSystem}{A}
-\wt[multiplicity=2]{0}{0}
+\wt[multiplicity=2,draw=gray]{0}{0}
\foreach \x/\y in {1/1, 2/-1, 1/-2, -1/-1, -2/1, -1/2}{\wt{\x}{\y}}
\end{rootSystem}
\end{tikzpicture}
\end{tcblisting}
-\begin{tcblisting}{}
-\begin{tikzpicture}
-\setlength\weightLength{.3cm}
-\begin{rootSystem}{A}
-\foreach \x/\y in {0/0, 3/0, 2/-1, 1/-2, 0/-3, 1/1, -1/-1, -1/2, -2/1, -3/3}{\wt{\x}{\y}}
-\end{rootSystem}
-\end{tikzpicture}
-\end{tcblisting}
-\begin{tcblisting}{}
-\begin{tikzpicture}
-\setlength\weightLength{.3cm}
-\begin{rootSystem}{A}
-\foreach \x/\y in {0/0, -3/0, 2/-1, 1/-2, 3/-3, 1/1, -1/-1, -1/2, -2/1, 0/3}{\wt{\x}{\y}}
-\end{rootSystem}
-\end{tikzpicture}
-\end{tcblisting}
\begin{tcblisting}{title={We use a basis of fundamental weights, as given in Carter's book \cite{Carter:2005} p. 540--609}}
\begin{tikzpicture}
\begin{rootSystem}{B}
@@ -744,15 +806,11 @@ Without automatic stretching of the weight lattice to fit the picture, you won't
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -774,8 +832,6 @@ Without automatic stretching of the weight lattice to fit the picture, you won't
\end{longtable}
-
-
Type \verb!\wt{x}{y}! to get a weight at position \((x,y)\) (as measured in a basis of \emph{fundamental weights}).
Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with option \verb!multiplicity=!\texttt{n} to get multiplicity $n$.
@@ -796,8 +852,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -813,8 +867,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\texttt{\detokenize{\wt[blue]{-1}{3}}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -847,8 +899,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -856,8 +906,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\texttt{\detokenize{\wt[multiplicity=2]{0}{0}}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -892,8 +940,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -901,8 +947,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\texttt{\detokenize{\WeylChamber}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -936,8 +980,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\RenewDocumentCommand\csdrawroots{m}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -945,8 +987,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\texttt{\detokenize{\positiveRootHyperplane}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -980,8 +1020,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\RenewDocumentCommand\csdrawroots{mm}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -989,8 +1027,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\texttt{\detokenize{\parabolic}\{#2\}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -1028,8 +1064,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\RenewDocumentCommand\csdrawroots{mm}%
{%
-\texttt{\detokenize{\begin{tikzpicture}[baseline=-.5]}}%
-\par\noindent%
\texttt{\detokenize{\begin{rootSystem}}\{#1\}}%
\par\noindent%
\texttt{\detokenize{\roots}}%
@@ -1039,8 +1073,6 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\texttt{\detokenize{\parabolicgrading}}%
\par\noindent%
\texttt{\detokenize{\end{rootSystem}}}%
-\par\noindent%
-\texttt{\detokenize{\end{tikzpicture}}}%
}%
\renewcommand*\mytablecontents{}
@@ -1068,12 +1100,10 @@ Add an option: \verb!\wt[Z]{x}{y}! to get \verb!Z! passed to TikZ, or with optio
\section{Examples of weights of various representations}
-
Henceforth assume \verb!\AutoSizeWeightLatticetrue! (the default).
\AutoSizeWeightLatticetrue
-
\begin{tcblisting}{title={Fulton and Harris, p. 186}}
\begin{tikzpicture}
\begin{rootSystem}{A}
@@ -1088,9 +1118,8 @@ Henceforth assume \verb!\AutoSizeWeightLatticetrue! (the default).
\begin{tcblisting}{title={A representation of \(G_2\)}}
-\setlength\weightLength{1cm}
\begin{tikzpicture}
-\begin{rootSystem}{G}
+\begin{rootSystem}[weight length=1cm,weight/.style={draw=gray,fill=none}]{G}
\roots
\foreach \m/\x/\y in {
1/1/1, 1/4/-1, 1/-1/2, 2/2/0, 1/5/-2,
@@ -1108,9 +1137,8 @@ Henceforth assume \verb!\AutoSizeWeightLatticetrue! (the default).
\begin{tcblisting}{title={Dimensions of representations of \(G_2\), parameterized by highest weight}}
-\setlength\weightLength{1cm}
\begin{tikzpicture}
-\begin{rootSystem}{G}
+\begin{rootSystem}[weight length=1cm]{G}
\roots
\foreach \x/\y/\d in {
0/1/14, 0/2/77, 0/3/273, 1/0/7, 1/1/64,
@@ -1128,6 +1156,37 @@ Henceforth assume \verb!\AutoSizeWeightLatticetrue! (the default).
\newpage
\section{More options}
+Options can be set using global TikZ keys
+\[
+\verb!\pgfkeys{/root system/simple root/.style=black}!
+\]
+{
+\pgfkeys{/root system/simple root/.style=black}
+\[
+\begin{tikzpicture}
+\begin{rootSystem}{G}
+\roots
+\end{rootSystem}
+\end{tikzpicture}
+\]
+}
+or, in each root system, using
+\begin{verbatim}
+\[
+\begin{tikzpicture}
+\begin{rootSystem}[weight length=.2cm]{G}
+\roots
+\end{rootSystem}
+\end{tikzpicture}
+\]
+\end{verbatim}
+\[
+\begin{tikzpicture}
+\begin{rootSystem}[weight length=.2cm]{G}
+\roots
+\end{rootSystem}
+\end{tikzpicture}
+\]
\newcommand*{\typ}[1]{#1}
\newcommand*{\optionLabel}[3]{%%
@@ -1148,16 +1207,22 @@ Henceforth assume \verb!\AutoSizeWeightLatticetrue! (the default).
\multicolumn{2}{c}{continued \dots}\\
\endfoot
\endlastfoot
-\commandLabel{weightRadius}{\typ{length}}{1.2pt}
+\optionLabel{weight radius}{\typ{length}}{1.2pt}
& Radius of dots used when marking specified weights. \\
-\commandLabel{weightLength}{\typ{length}}{.5cm}
+\optionLabel{weight length}{\typ{length}}{.5cm}
& Minimum distance between distinct weights. \\
-\commandLabel{gradingDot}{\typ{length}}{2pt}
+\optionLabel{grading dot radius}{\typ{length}}{2pt}
& Size of dot around a root using to indicate a grading of a parabolic subalgebra which only contains one root. \\
\optionLabel{weight lattice}{\typ{TikZ style data}}{gray!40}
& Style for drawing weight lattice lines. \\
\optionLabel{root}{\typ{TikZ style data}}{gray}
& Style for drawing roots. \\
+\optionLabel{simple root}{\typ{TikZ style data}}{fill=white,draw=gray}
+& Style for drawing simple roots. \\
+\optionLabel{weight}{\typ{TikZ style data}}{fill=gray,draw=white}
+& Style for drawing weights. \\
+\optionLabel{fundamental weight}{\typ{TikZ style data}}{fill=black,draw=gray}
+& Style for drawing fundamental weights. \\
\optionLabel{root polygon}{\typ{TikZ style data}}{gray!40,opacity=.5}
& Style for drawing a polygon which indicates the locations of the roots. \\
\optionLabel{hyperplane}{\typ{TikZ style data}}{gray!50,fill opacity=.5}
@@ -1168,21 +1233,6 @@ Henceforth assume \verb!\AutoSizeWeightLatticetrue! (the default).
& Style for drawing a thick line over top of some roots to indicate that they lie in the same grading associated to a parabolic subgroup. \\
\end{longtable}
-\begin{verbatim}
-\newlength\weightRadius
-\setlength\weightRadius{1.2pt}
-\newlength\weightLength
-\setlength\weightLength{.5cm}
-\newlength\gradingDot
-\setlength\gradingDot{2pt}
-\tikzstyle{weight lattice}=[gray!40]
-\tikzstyle{root}=[gray]
-\tikzstyle{root polygon}=[gray!40,opacity=.5]
-\tikzstyle{hyperplane}=[gray!50,fill opacity=.5]
-\tikzstyle{Weyl chamber}=[gray!60,fill opacity=.5]
-\tikzstyle{grading}=[line width=3pt,gray,opacity=0.5,line cap=round]
-\end{verbatim}
-
\bibliographystyle{amsplain}
\bibliography{rank-2-roots}