% ---------------------------------------------------------------------- % aTableau - Andrew Mathas (C) 2022-2025 % Modified: 08:08 Friday, 10 October 2025 % ---------------------------------------------------------------------- \documentclass{amsart} \usepackage[svgnames,table]{xcolor} \usepackage{atableau} \usepackage{bbding} \usepackage{bm} \usepackage{booktabs} \usepackage{cite} \usepackage{cprotect} \usepackage{longtable} \usepackage{manfnt} \usepackage{mathtools} \usepackage{MnSymbol} \usepackage{siunitx} \usepackage{xltabular} \usepackage{xspace} % ---------------------------------------------------------------------- \usepackage{array} \newcolumntype{L}{>{\sffamily\color{MidnightBlue}\textbackslash}l} \newcolumntype{O}{>{\sffamily\color{aTableauInner}}l} % --------------------------------------------------------------------------- \usepackage{enumitem} \setlist{itemsep=2mm, parsep=2mm} \newlist{options}{description}{1} % remove the colon from the description label by redefining \makelabel \setlist[options]{ before=\let\makelabel\optionlabel, labelwidth=\textwidth, nosep, } % --------------------------------------------------------------------------- % the index \usepackage{imakeidx} \indexsetup{level=\section*, toclevel=section, noclearpage} \makeindex[columns=3] \renewcommand*{\seename}{see} % ---------------------------------------------------------------------- \usepackage[a4paper,hmargin=24mm, vmargin=18mm, footskip=10mm]{geometry} \synctex=1 \hfuzz=5pt \parindent=0pt \parskip=4mm \makeatletter \def\@evenhead{\hfill\aTableau\hfill} \let\@oddhead\@evenhead \def\@oddfoot {\color{aTableauMain} Version \aTableau@version~(\aTableau@release)\hfill\thepage} \def\@evenfoot{\color{aTableauMain} \thepage\hfill Version \aTableau@version~(\aTableau@release)} % streamline font warnings following David Carlisle https://tex.stackexchange.com/a/663843/234252 \let\old@font@info\@font@info \def\@font@info#1{% \expandafter\ifx\csname\detokenize{#1}\endcsname\relax \old@font@info{#1}% \fi \expandafter\xdef\csname\detokenize{#1}\endcsname{}% } \makeatother % ---------------------------------------------------------------------- \newcommand\aTableauColour[1]{% \,\tikz[baseline={([yshift=0.5mm]current bounding box.south)}]\node[minimum width=3ex, minimum height=2ex,fill=aTableau#1]{};\,% } % ---------------------------------------------------------------------- \ExplSyntaxOn % ---------------------------------------------------------------------- % In the table summarising the keys, \Yes and \No are used to show where % the keys applies to tableaux or abacuses( or both), with \Yes adding a % hyperlink when it does. \newcommand\No{\textcolor{red}{\XSolidBrush}} \NewDocumentCommand\Yes{o d()} { \IfNoValueTF{#1} { \IfNoValueTF{#2} { \hyperref[\g_lastlink_tl]{\textcolor{ForestGreen}{\CheckmarkBold}} } { \hyperref[Key:#2]{\textcolor{ForestGreen}{\CheckmarkBold}} } } { \hyperref[\g_lastlink_tl-\str_lowercase:f{#1}]{\textcolor{ForestGreen}{\CheckmarkBold}} } } % \optionlabel applies \option to the csv in #1 except in the case % when #1 starts with a * when the rest of #1 is printed \NewDocumentCommand\optionlabel{ m } { \str_if_eq:eeTF { \str_head:n {#1} } {*} { \tl_set:Nx \l_tmpb_tl { \tl_tail:n {#1} } \tl_put_left:Nn \l_tmpb_tl {\sffamily\color{aTableauInner}} } { \tl_clear:N \l_tmpa_tl \tl_clear:N \l_tmpb_tl \clist_map_inline:nn {#1} { \tl_put_right:Ne \l_tmpb_tl { \l_tmpa_tl \exp_not:N\option{##1}} \tl_set:Nn \l_tmpa_tl {,~} } } \l_tmpb_tl\hss } % Add hyperlinks for (new displayed) options \tl_new:N \g_lastlink_tl \prop_new:N \l__aTableau_options_prop \NewDocumentCommand\AddKeyLink{m} { \tl_gset:Nx \g_lastlink_tl {Key:\str_lowercase:f{#1}} \prop_if_in:NVF \l__aTableau_options_prop \g_lastlink_tl { \phantomsection\exp_args:Nf\label{Key:\str_lowercase:f{#1}}% add a label for references \prop_put:NVn \l__aTableau_options_prop \g_lastlink_tl {} } } % Add an index entry for a key. The *-form underlines the page number, % indicating that it is the definition of the key, and records this in % \l__aTableau_index_prop. When the * is not present, we check to make % sure that an underlined entry has not already been added for this % page. \prop_new:N \l__aTableau_index_prop \NewDocumentCommand\AddIndexEntry{ sm } { \tl_set:No \l_tmpc_tl {#2-\thepage} \IfBooleanTF{#1} { \prop_put:NVn \l__aTableau_index_prop \l_tmpc_tl {} \index{#2|underline} } { \prop_if_in:NVF \l__aTableau_index_prop \l_tmpc_tl { \index{#2} } } } % \option*[default value]{option name}[accepted values](link name) % The \option command is slightly overloaded, both in terms of arguments % (there are five) and in terms of use. % 1. If #2 is given then \option gives the syntax for the using this key: % - #1=* determines whether a \newline or \bigskip is inserted. The % *-version is used when a block of keys are listed together % - #2 gives the default options % - #3 is the key name and optionally may take the form key=value % to describe the allowed values. If the value is given then it is % printed in orange after the key inside \langle...\rangle. This is % intended for "generic values like 'value' or 'style'. % The key component of #2 is used to add a hyperlink to the current % location, which takes the form Key:-, where the % is added only if #5 is supplied % - any accepted values in #3 are printed in the right-hand margin % 2. When #2 is omitted, this an inline citation of the key. A % hyperlink is added % The *-version does not do a \bigskip before the option. A hyperlink is % added for new displayed options. If #2 is blank then the *-version % puts (no) before the option key. If #5 is given then it is added to % to the hyperlink. \NewDocumentCommand\option{ somo d<> d()} {% \seq_set_split:Nnn \l_tmpa_seq {=} {#3}% \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl% \seq_if_empty:NTF \l_tmpa_seq { \tl_clear:N \l_tmpb_tl } { \tl_set:No \l_tmpb_tl { \seq_use:Nn \l_tmpa_seq {=} } } \IfNoValueTF{#2} {% \IfNoValueTF{#6} { \tl_gset:Nx \g_lastlink_tl {Key:\str_lowercase:f{\l_tmpa_tl}} \IfNoValueF{#5} { \tl_gput_right:No \g_lastlink_tl {\str_lowercase:f{-#5}} } } { \tl_gset:Ne \g_lastlink_tl {Key:#6} } \hyperref[\g_lastlink_tl]{\textsf{\color{aTableauInner}\IfBooleanT{#1}{(no)~}\l_tmpa_tl}} \AddIndexEntry{\l_tmpa_tl}% \tl_if_empty:NF \l_tmpb_tl { \textsf{\,$=$}\textsf{\textcolor{orange}{\l_tmpb_tl}} } } {% % encourage page breaks *before* the option, rather than after it \IfBooleanTF{#1}{\newline}{\bigskip\pagebreak[0]}% % adjust #3 if it contains a *, when we add = % add a label for references \IfNoValueTF{#5} { \AddKeyLink{\l_tmpa_tl} }{ \AddKeyLink{\l_tmpa_tl-#5} } \noindent\textsf { \textcolor{aTableauInner}{\l_tmpa_tl} \tl_if_empty:NF \l_tmpb_tl { \textcolor{orange}{$\,=\langle$\l_tmpb_tl$\rangle$} } } \tl_if_blank:nF {#2} { ~ \tl_if_eq:nnTF{#2} {-} {(default)} {(default:~\textcolor{DarkRed}{#2})} }% \hfill% \IfNoValueF{#4}{\textcolor{Grey}{[accepts:~#4]}}% \AddIndexEntry*{\l_tmpa_tl}% \nopagebreak[4]% }% } % index command ignoring the backslash and capitalisation \cs_new_protected:Npn \__addto_index:nn #1#2 { \index{#2@\textbackslash #1} } \cs_generate_variant:Nn \__addto_index:nn {nV} \NewDocumentCommand\indexcmd{m} { \tl_set:Nx \l_tmpa_tl { \str_lower_case:n {#1} } \__addto_index:nV {#1} \l_tmpa_tl } % --------------------------------------------------------------------------- % heading lines in tabular environments \newcommand\heading[1]{\textcolor{MidnightBlue}{\textsf{\large#1}}} % set alternating row colours in tabular environments \rowcolors{1}{}{LightSkyBlue!10} % displaying a colour theme \NewDocumentCommand\ColourTheme{ m } { \begin{samepage} \option{colour~theme=#1} \aTabset{colour~theme=#1, align=top} \index{colour~theme!#1} \rowcolors{2}{}{LightSkyBlue!10} \par \begin{tabular}[t]{lll} \toprule \heading{Colour} & \heading{Name} & \heading{HTML}\\ \midrule \aTableauColour{Main} & aTableauMain & \prop_item:Nn \l__aTableau_colour_theme_prop {#1_Main} \\ \aTableauColour{Inner} & aTableauInner & \prop_item:Nn \l__aTableau_colour_theme_prop {#1_Inner}\\ \aTableauColour{Star} & aTableauStar & \prop_item:Nn \l__aTableau_colour_theme_prop {#1_Star}\\ \aTableauColour{Skew} & aTableauSkew & \prop_item:Nn \l__aTableau_colour_theme_prop {#1_Skew} \\ \aTableauColour{Fill} & aTableauFill & \prop_item:Nn \l__aTableau_colour_theme_prop {#1_Fill}\\ \aTableauColour{Rod} & aTableauRod & \prop_item:Nn \l__aTableau_colour_theme_prop {#1_Rod}\\ \bottomrule \end{tabular} \hfill \Abacus{4}{4^3,2_a,1^2_\bullet,0}\qquad \Abacus[traditional]{4}{4^3,2_a,1^2_\bullet,0} \qquad \par\vspace*{3mm} \hspace*{-3mm} \Tableau{1239,456{10},78}\quad \Tableau{ 1*2*3*4*5, 6*789, {10}*{11}{12} }\quad \Tabloid[skew={2,1}]{19{11},29{10},6} \quad \SkewTableau[skew~boxes, skew~border, cover=4^3] {2,1^2}{123,45,67} \quad \Multitableau[tabloid]{ 123,45 | 67,89, {10}} \quad \par\vspace*{4mm} \end{samepage} } % --------------------------------------------------------------------------- % the testing framework % \ifTesting is True when we are testing the examples against previous % runs. This is used to define new versions of the example and Example % environment that save the example to a file using \SaveExample \newif\ifTesting % Enable \ifTesting for atableau-testing.tex, which is a sym-link to atableau.tex \str_if_eq:VnT \jobname {atableau-examples} {\Testingtrue} \iow_new:N \__aTableau_example_iow \cs_generate_variant:Nn \str_replace_all:Nnn { Nnx } % Usage: \SaveExample {filename} {example} % Save an example to an external file in the testing directory so that % we can check for changes in the output from the example code. \NewDocumentCommand\SaveExample{m +m} { \refstepcounter{example} % want to save the example number \iow_open:Nn \__aTableau_example_iow { #1.tex } % the examples are controlled by a custom document class \iow_now:Nn \__aTableau_example_iow { \documentclass{atableau_example} } \iow_now:Nn \__aTableau_example_iow { \begin{document} } \iow_now:Ne \__aTableau_example_iow { \c_percent_str~Example~\theexample } \str_set:Ne \l_tmpa_str { \tl_to_str:n{#2} } \str_replace_all:Nnx \l_tmpa_str { ## } { \c_hash_str } \iow_now:Ne \__aTableau_example_iow { \l_tmpa_str } \iow_now:Nn \__aTableau_example_iow { \end{document} } \iow_close:N \__aTableau_example_iow } \ExplSyntaxOff % --------------------------------------------------------------------------- %\renewcommand\thesubsection{\thesection\Alph{subsection}} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \renewcommand\thesubsection{\thesection\Alph{subsection}} \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}} \makeatletter \def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}} \def\l@subsubsection{\@tocline{2}{0pt}{3.5pc}{3pc}{}} \makeatother % warning environment to alert the reader to tricky points \newenvironment{warning}{% \list{\raisebox{-2ex}[0pt][0pt]{\textcolor{red}{\textdbend}}}% {\leftmargin=3em}% \item% }{\endlist} % --------------------------------------------------------------------------- \usepackage[skins]{tcolorbox} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=MediumBlue, citecolor=FireBrick, } % --------------------------------------------------------------------------- \tcbuselibrary{listings, breakable} \DeclareTotalTCBox\keyword{ O{} v } { bottom=0pt, colback = Ivory, colupper = aTableauInner, fontupper= \bfseries, fontlower= \bfseries, left = 0mm, right = 0mm, size = tight, skin = tile, top = 0pt, nobeforeafter, on line, verbatim, shrink tight, size=tight, #1} {#2} \NewTColorBox{slide}{ O{} } { enhanced, skin=bicolor, before skip=-2mm, %after skip=2mm, attach boxed title to top left={xshift=0cm,yshift*=0mm-\tcboxedtitleheight}, boxrule=0.6pt, boxed title style={ size=small, sharp corners=uphill, boxrule=0.6pt, }, arc is curved, arc = 1.5mm, height=0.25\linewidth, width=0.3\linewidth, after=\hfill, before=\hfill, fonttitle=\tiny\sffamily, colback=AliceBlue, colbacklower=OldLace, colframe=RoyalBlue!50, colbacktitle=RoyalBlue!70, #1 } % --------------------------------------------------------------------------- \newcommand\aTableau{\textcolor{aTableauMain}{\sffamily aTableau}\xspace} % hyperref links to ctan \newcommand\TeXLive{\href{https://www.tug.org/texlive/}{TeX~Live}\xspace} \newcommand\TikZ{\href{https://www.ctan.org/pkg/tikz}{Ti\textit{k}Z}\xspace} \newcommand\arXiv{\href{https://arxiv.org/}{arXiv}\xspace} \newcommand\ctan[1]{\href{https://www.ctan.org/pkg/#1}{\texttt{#1}}} \lstdefinestyle{aTableau} { style=tcblatex, classoffset=0, texcsstyle=*\color{MediumBlue},% deletetexcs={begin, end}, commentstyle=\color{Peru}, moretexcs={,% aTableau package commands aTabset, Abacus, Diagram, Multidiagram, Multitableau, NewATableauCommand, RibbonTableau, ShiftedDiagram, ShiftedTableau, SkewTableau, SkewDiagram, Tableau, Tabloid, },% % Highlighting of multi-word keys is not possible, so we do not highlight the keys % classoffset=1, % aTableau package options % keywordstyle=\color{aTableauInner},% % morekeywords={ % Australian, % English, % French, % Ukrainian, % align, % australian, % border, % box, % boxes, % color, % colour, % cols, % conjugate, % delimiter, % delimiters, % dotted, % e, % east, % english, % entries, % finite, % font, % french, % halign, % height, % infinite, % inner, % label, % left, % math, % no, % nodes, % north, % only, % ribbon, % ribbons, % right, % rows, % scale, % separator, % separators, % shape, % shifted, % skew, % snobs, % valign, % south, %% star, %% style, % tabloid, % text, % text, % type, % ukrainian, % wall, % west, % width, % xoffset, % xscale, % yoffset, % yscale, % }, % classoffset=2, % aTableau values % keywordstyle=\color{orange},% % morekeywords={ % A, C, DD, AA, % beta, % bottom, % center, % centre, % contents, % false, % first, % hooks, % last, % left, % residues, % right, % row, % top, % true, % }, % classoffset=3, % TikZ and LaTeX commands % keywordstyle=\color{teal},% % morekeywords={ % draw, % foreach, % node, % small, % tiny, % tikz, % tikzpicture, % tikzset, % }, % classoffset=4,% TikZ keys % keywordstyle=\color{red}, % morekeywords={ % circle, % fill, % overlay, % picture, % radius, % remember, % style, % }, classoffset=5, % commands that we want to hide :) keywordstyle=\color{LightSkyBlue!10}, morekeywords={ bigskip, medskip, newline, par, qquad, quad, smallskip, space, }, } % --------------------------------------------------------------------------- \NewDocumentCommand\set{ O{} >{\SplitArgument{1}{|}}m }{#1\{\,\SetContents{#1}#2\,#1\}} \NewDocumentCommand\SetContents{mmm}{\IfNoValueTF{#3}{#2}{#2\,#1|\,\mathopen{}#3}} \newcommand\T{\mathsf{t}} \newcommand\blam{{\bm{\lambda}}} % --------------------------------------------------------------------------- % manual title \makeatletter \author{Andrew Mathas} \usepackage{tikz} \usetikzlibrary{ backgrounds, decorations.pathmorphing, matrix, patterns, shadows.blur, shapes.geometric, } \tikzset{ shadowed/.style={ blur shadow={shadow blur steps=5}, bottom color=RoyalBlue, draw=NavyBlue!70, shade, font=\normalfont\Huge\bfseries\scshape, %rounded corners=8pt, top color=LightSkyBlue!30, }, boxes/.style={draw=RoyalBlue, fill=AliceBlue, font=\sffamily\small, inner sep=5pt, rectangle, rounded corners=8pt, text=MidnightBlue, } } % define the heading as a command because it contains \aTableau@version \newcommand\aTableauHeader{% \begin{center} \begin{tikzpicture} \aTabset{border=false} \draw[shadowed, rounded corners](30mm,0) rectangle node[white]{ } (\paperwidth-30mm,22mm); \begin{scope}[shift={(2.6,-0.2)}] \aTabset{scale=0.5, ribbon style={fill=LightSkyBlue!10}, inner wall=MidnightBlue} \Diagram(4,2) [ribbons={11,12,13,21,23,31,32,33,41,43,51,53}]{} % A \Diagram(5,2) [ribbons={11,12,13,22,32,42,52}]{} % T \Diagram(6,2) [ribbons={11,12,13,21,23,31,32,33,41,43,51,53}]{} % A \Diagram(7,2) [ribbons={11,12,13,21,23,31,32,33,41,43,51,52,53}]{} % B \Diagram(8,2) [ribbons={11,21,31,41,51,52,53}]{} % L \Diagram(9,2) [ribbons={11,12,13,21,31,32,33,41,51,52,53}]{} % E \Diagram(10,2)[ribbons={11,12,13,21,23,31,32,33,41,43,51,53}]{} % A \Diagram(11,2)[ribbons={11,13,21,23,31,33,41,43,51,52,53}]{} % U \end{scope} \node[anchor=west,boxes] at (4cm,0cm) {Andrew Mathas}; \node[anchor=east,boxes] at (\paperwidth-4cm,0) {Version \aTableau@version}; \end{tikzpicture} \end{center} } % ---------------------------------------------------------------------- \hypersetup{ pdfcreator={ Generated by pdfLaTeX }, pdfinfo={ Author ={ Andrew Mathas }, Keywords={ Algebraic combinatorics, representation theory, abacus, Young diagram, tableau, symmetric groups }, License ={ LaTeX Project Public License v1.3c or later }, Subject ={ LaTeXing tableaux and friends }, Title ={ ATableau - \aTableau@version } }, colorlinks=true, linkcolor=blue, urlcolor=MediumBlue, } \makeatother % ---------------------------------------------------------------------- \numberwithin{equation}{subsection} \def\equationautorefname~#1\null{(#1)\null} \renewcommand\sectionautorefname{Chapter} \renewcommand\subsectionautorefname{Section} \def\subsubsectionautorefname~#1\null{\S#1\null} % ---------------------------------------------------------------------- \newcounter{example} \numberwithin{example}{subsection} \newcommand\exampleautorefname{Example} % Each of the example environments must have a label. In the manual, % \autoref{Ex: