%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % young.sty % % % % version 0.67 % % % % Copyright 2011 Kevin Purbhoo % % Licence: GNU general public licence version 2 % % % % This is an EXTENSIVELY modified version of % % YOUNG.STY by J"org Knappen 7-feb-1992 % % Licence: GNU licence version 2 % % based on YOUNG.TEX % % macro to make Young tableaux % % by: Paul E. S. Wormer % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % This program is free software: you can redistribute it and/or modify % % it under the terms of the GNU General Public License as published by % % the Free Software Foundation, version 2. % % % % This program is distributed in the hope that it will be useful, % % but WITHOUT ANY WARRANTY; without even the implied warranty of % % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % % GNU General Public License for more details. % % % % You should have received a copy of the GNU General Public License % % along with this program. If not, see . % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Global color variables % \newcommand*{\yshadecolorbg}{} \newcommand*{\yshadecolorfg}{} \newcommand*{\YShadeColorBg}{} \newcommand*{\YShadeColorFg}{} \newcommand*{\YSHADECOLORFG}{} \newcommand*{\YSHADECOLORBG}{} \newcommand*{\yaltshadecolorbg}{} \newcommand*{\yaltshadecolorfg}{} \newcommand*{\YAltShadeColorBg}{} \newcommand*{\YAltShadeColorFg}{} \newcommand*{\YALTSHADECOLORFG}{} \newcommand*{\YALTSHADECOLORBG}{} % % Commands to set colors % \newcommand*{\ysetshade}[2][]{% \def\yshadecolorfg{#1}% \def\yshadecolorbg{#2}% } \newcommand*{\YSetShade}[2][]{% \def\YShadeColorFg{#1}% \def\YShadeColorBg{#2}% } \newcommand*{\YSETSHADE}[2][]{% \def\YSHADECOLORFG{#1}% \def\YSHADECOLORBG{#2}% } \newcommand*{\ysetaltshade}[2][]{% \def\yaltshadecolorfg{#1}% \def\yaltshadecolorbg{#2}% } \newcommand*{\YSetAltShade}[2][]{% \def\YAltShadeColorFg{#1}% \def\YAltShadeColorBg{#2}% } \newcommand*{\YSETALTSHADE}[2][]{% \def\YALTSHADECOLORFG{#1}% \def\YALTSHADECOLORBG{#2}% } % % Default options for young environment % \newcommand*{\y@defaultcellsize}{2.8ex} \newcommand*{\y@defaultposition}{b} \newcommand*{\youngspecial}{,;=!?^_} \newcommand*{\y@hwratio}{1:1} \newcommand*{\y@everycell}{} \newcommand*{\y@everyframe}{} % % Commands for setting them % \newcommand*{\ydefaultcellsize}[1]{\def\y@defaultcellsize{#1}} \newcommand*{\ydefaultposition}[1]{\def\y@defaultposition{#1}} \newcommand*{\yhwratio}[1]{\def\y@hwratio{#1}} \newcommand*{\yeverycell}[1]{\def\y@everycell{#1}} \newcommand*{\yeveryframe}[1]{\def\y@everyframe{#1}} % % public lengths % \newlength\ybaselineoffset \setlength{\ybaselineoffset}{.75ex} \newlength\yframethickness \setlength{\yframethickness}{0.5pt} \newlength\yautosizeminimum \setlength{\yautosizeminimum}{2.8ex} \newlength\ycellpadding \setlength{\ycellpadding}{0.3ex} % % A counter that get's incremented with every \begin{young} % \newcounter{youngcounter} % % Commands to set formatting for cells drawn in the young environment % \newcommand\yframe{% cell with a frame \gdef\y@draw@left{l}% \gdef\y@draw@right{r}% \gdef\y@default@draw@state{}% \gdef\y@use@default@draw{}% } \newcommand\ynoframe{% cell with no frame \global\let\y@box@cmd\y@nofbox% \gdef\y@use@default@draw{}% } \newcommand\ynoright{% \gdef\y@draw@left{l}% \gdef\y@draw@right{}% \gdef\y@default@draw@state{[}% \gdef\y@use@default@draw{}% } \newcommand\ynoleft{% \gdef\y@draw@left{}% \gdef\y@draw@right{r}% \gdef\y@default@draw@state{]}% \gdef\y@use@default@draw{}% } \newcommand\ynoleftright{% \gdef\y@draw@left{}% \gdef\y@draw@right{}% \gdef\y@default@draw@state{=}% \gdef\y@use@default@draw{}% } \newcommand\ynotop[1][]{% \def\y@patch{#1} \ifx\y@patch\empty% \gdef\y@dont@draw@top{y}% \else \gdef\y@dont@draw@top{#1}% \fi% } \newcommand\ywithtop{% \gdef\y@dont@draw@top{}% } \newcommand\ynobottom[1][]{% \def\y@patch{#1} \ifx\y@patch\empty% \gdef\y@dont@draw@bottom{y}% \else \gdef\y@dont@draw@bottom{#1}% \fi% } \newcommand\ywithbottom{% \gdef\y@dont@draw@bottom{}% } \def\y@shadeopt[#1]{% \xdef\y@shade@color@fg{}% \xdef\y@shade@color@bg{#1}}% \def\y@shadenoopt{% \xdef\y@shade@color@fg{\yshadecolorfg}% \xdef\y@shade@color@bg{\yshadecolorbg}% } \newcommand\yshade[1][@@@@]{% Shade cell in color ##1 if specified \def\y@stringa{@@@@}% or colors set by \ysetshade otherwise \def\y@stringb{#1}% \ifx\y@stringa\y@stringb% \y@shadenoopt% \else% \y@shadeopt[#1]% \fi% } \newcommand\YShade{% Shaded cell in color set by \YSetShade \ifx\YShadeColorFg\empty% \xdef\y@shade@color@fg{\yshadecolorfg}% \else% \xdef\y@shade@color@fg{\YShadeColorFg}% \fi% \xdef\y@shade@color@bg{\YShadeColorBg}% } \newcommand\YSHADE{% Shaded cell in color set by \YSETSHADE \ifx\YSHADECOLORFG\empty% \ifx\YShadeColorFg\empty% \xdef\y@shade@color@fg{\yshadecolorfg}% \else% \xdef\y@shade@color@fg{\YShadeColorFg}% \fi% \else% \xdef\y@shade@color@fg{\YSHADECOLORFG}% \fi% \xdef\y@shade@color@bg{\YSHADECOLORBG}% } \newcommand\yaltshade{% Shaded cell in color set by \ysetaltshade \xdef\y@shade@color@fg{\yaltshadecolorfg}% \xdef\y@shade@color@bg{\yaltshadecolorbg}% } \newcommand\YAltShade{% Shaded cell in color set by \YSetAltShade \ifx\YAltShadeColorFg\empty% \xdef\y@shade@color@fg{\yaltshadecolorfg}% \else% \xdef\y@shade@color@fg{\YAltShadeColorFg}% \fi% \xdef\y@shade@color@bg{\YAltShadeColorBg}% } \newcommand\YALTSHADE{% Shaded cell in color set by \YSETSHADE \ifx\YALTSHADECOLORFG\empty% \ifx\YAltShadeColorFg\empty% \xdef\y@shade@color@fg{\yaltshadecolorfg}% \else% \xdef\y@shade@color@fg{\YAltShadeColorFg}% \fi% \else \xdef\y@shade@color@fg{\YALTSHADECOLORFG}% \fi% \xdef\y@shade@color@bg{\YALTSHADECOLORBG}% } \newcommand\ynoshade{% \xdef\y@shade@color@fg{}% \xdef\y@shade@color@bg{}% } \newcommand\yvalignincell[1]{% \xdef\y@valign@cell{#1}% } \newcommand\yrighttoleft{% \xdef\y@order@right@to@left{y}% } % % Commands used for autosizing % \newcounter{young@auto}% Keeps track of autosized tableaux \newcounter{last@young@auto}% Keeps track of how many there were last time \newcommand*{\y@autosizedata}[4]{% \global\@namedef{y@auto@#1}{#3}% \global\@namedef{y@autowarn@#2}{#4}% \global\@namedef{y@autoname@#2}{#1}% \stepcounter{last@young@auto}% }% % This command is used by the .aux file. % Three macros are declared. The first allows us to lookup the cell size % of a tableau by its label. The second does lookup by counter. % The third allows us to lookup of label name using the counter. % Since more than one tableau may have the same label, the results % of the first two lookups may not always agree. By-label lookup is used % to set the cell size. The other two are used to check if things have % changed since the last run. \newif\if@y@autosize@warning% Becomes true if we need to generate \@y@autosize@warningfalse% a warning at the end of document \newif\if@y@use@autosize% True if cell size is "auto" or "auto=