summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ytableau/ytableau.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-08-16 22:44:34 +0000
committerKarl Berry <karl@freefriends.org>2012-08-16 22:44:34 +0000
commiteb49231093d1336c3166b1b979ad69342430b282 (patch)
tree0005ad507f5849b0f43787e4f24fae77a67712fd /Master/texmf-dist/tex/latex/ytableau/ytableau.sty
parent4501afc7b7e851f4a67545b3ebfb04cba16f6ca8 (diff)
ytableau (16aug12)
git-svn-id: svn://tug.org/texlive/trunk@27430 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ytableau/ytableau.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ytableau/ytableau.sty70
1 files changed, 58 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/ytableau/ytableau.sty b/Master/texmf-dist/tex/latex/ytableau/ytableau.sty
index 9a4203d2dcd..af03c28f3cf 100644
--- a/Master/texmf-dist/tex/latex/ytableau/ytableau.sty
+++ b/Master/texmf-dist/tex/latex/ytableau/ytableau.sty
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ytableau}
- [2012/06/17 v1.2 Many-featured Young tableaux and Young diagrams]
+ [2012/08/14 v1.3 Many-featured Young tableaux and Young diagrams]
\newbox\tableaux@YT
@@ -44,6 +44,20 @@
\def\boxdim@normal@YT{1.5em}
\let\boxdim@save@YT = \boxdim@normal@YT
\edef\macro@boxdim@YT{\boxdim@normal@YT}
+\def\hrule@normal@YT{%
+ \hrule width \dimexpr \boxdim@YT + \fboxrule * 2\relax
+ height \fboxrule
+}
+\def\vrule@normal@YT{%
+ \vrule height \dimexpr \boxdim@YT + \fboxrule\relax
+ width \fboxrule
+}
+\def\hrule@none@YT{\kern\fboxrule}
+\def\vrule@none@YT{%
+ \vrule width 0pt
+ height \dimexpr \boxdim@YT + \fboxrule\relax
+ \kern\fboxrule
+}
\def\font@YT{}
\def\set@mathmode@YT{%
\gdef\skipin@YT{$}%
@@ -140,8 +154,23 @@
nobaseline/.style = {baseline = false},
centerboxes/.style = {baseline = false},
}
-\ytableausetup{nosmalltableaux,mathmode,baseline}
-\RequirePackage{pgfopts}
+\pgfkeys{/ytableau/options,
+ tabloids/.default = true,
+ tabloids/.is choice,
+ tabloids/true/.code = {%
+ \global\let\vrule@YT=\vrule@none@YT
+ \global\let\hrule@YT=\hrule@normal@YT
+ },
+ tabloids/false/.code = {%
+ \global\let\vrule@YT=\vrule@normal@YT
+ \global\let\hrule@YT=\hrule@normal@YT
+ },
+ tabloids/on/.style = {tabloids/true},
+ tabloids/off/.style = {tabloids/false},
+ notabloids/.style = {tabloids/false},
+}
+\ytableausetup{nosmalltableaux,mathmode,baseline,notabloids}
+\RequirePackage{pgfopts}[2011/06/02]
\ProcessPgfPackageOptions{/ytableau/options}
\RequirePackage{xcolor}
\newenvironment{ytableau}[1][]
@@ -194,8 +223,8 @@
\def\cr@YT{\cr}
\newcommand{\none@YT}[1][]{%
\def\thisboxcolor@YT{clear}%
- \fboxsep = \boxframe@YT\relax
- \fboxrule = 0pt %
+ \let\hrule@YT=\hrule@none@YT
+ \let\vrule@YT=\vrule@none@YT
\startbox@@YT#1\endbox@YT
\nullfont
}
@@ -225,16 +254,33 @@
\dp\thisbox@YT=\dp\refhtdp@YT
\fi
\fcolorbox@YT{\thisboxcolor@YT}{%
- \vbox to \boxdim@YT{\vss\box\thisbox@YT\vss}%
+ \vbox to \dimexpr\boxdim@YT + \fboxrule\relax{\vss\box\thisbox@YT\vss}%
}%
}
\def\fcolorbox@YT#1#2{%
- \compare@@YT{#1}{clear}%
- \ifeq@YT
- \fbox{#2}%
- \else
- \fcolorbox{.}{#1}{#2}%
- \fi
+ \lower\fboxrule\vbox{%
+ \ifodd\fboxrule\kern1sp \fi
+ \kern0.5\fboxrule
+ \hbox{%
+ \kern\fboxrule
+ \compare@@YT{#1}{clear}%
+ \ifeq@YT
+ #2%
+ \else
+ \colorbox{#1}{#2}%
+ \fi
+ \rules@YT{v}%
+ }%
+ \kern-0.5\fboxrule
+ \rules@YT{h}%
+ }%
+}
+\def\rules@YT#1{%
+ \expandafter\let\expandafter\rule@YT\csname #1rule@YT\endcsname
+ \kern-\dimexpr\boxdim@YT + \fboxrule\relax
+ \rule@YT
+ \kern\boxdim@YT
+ \rule@YT
}
\newcommand{\ytableaushort}[2][]{%
\toks@YT={}%