From 00d2addcd91a60783f8f5f8149c500a18793c18b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Jan 2006 00:12:00 +0000 Subject: youngtab git-svn-id: svn://tug.org/texlive/trunk@1469 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/youngtab/youngtab.sty | 152 ++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/youngtab/youngtab.sty (limited to 'Master/texmf-dist/tex/latex/youngtab/youngtab.sty') diff --git a/Master/texmf-dist/tex/latex/youngtab/youngtab.sty b/Master/texmf-dist/tex/latex/youngtab/youngtab.sty new file mode 100644 index 00000000000..833a3a2b885 --- /dev/null +++ b/Master/texmf-dist/tex/latex/youngtab/youngtab.sty @@ -0,0 +1,152 @@ +%% +%% This is file `youngtab.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% youngtab.dtx (with options: `package') +%% +%% Copyright (C) 1996,98,99 Volker B"orchers and Stefan Gieseke, +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +%% +%% File: youngtab.dtx +%% Copyright (C) 1996,98,99 Volker B"orchers and Stefan Gieseke, +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{youngtab} +[1999/05/19 v1.1; Macros for Young-Tableaux] +%% Package `youngtab' to use with TeX, LaTeX209 or LaTeX2e +%% (You will need LaTeX2e to extract the documentation and a STY-file +%% without comments from the .dtx file) +\newif\ify@autoscale \y@autoscaletrue \def\Yautoscale#1{\ifnum #1=0 + \y@autoscalefalse\else\y@autoscaletrue\fi} +\newdimen\y@b@xdim +\newdimen\y@boxdim \y@boxdim=13pt +\def\Yboxdim#1{\y@autoscalefalse\y@boxdim=#1} +\newdimen\y@linethick \y@linethick=.3pt +\def\Ylinethick#1{\y@linethick=#1} +\newskip\y@interspace \y@interspace=0ex plus 0.3ex +\def\Yinterspace#1{\y@interspace=#1} +\newif\ify@vcenter \y@vcenterfalse +\def\Yvcentermath#1{\ifnum #1=0 \y@vcenterfalse\else\y@vcentertrue\fi} +\newif\ify@stdtext \y@stdtextfalse +\def\Ystdtext#1{\ifnum #1=0 \y@stdtextfalse\else\y@stdtexttrue\fi} +\newif\ify@enable@skew \y@enable@skewfalse +\DeclareOption{noautoscale}{\y@autoscalefalse} +\DeclareOption{vcentermath}{\y@vcentertrue} +\DeclareOption{stdtext}{\y@vcentertrue} +\DeclareOption{enableskew}{\y@enable@skewtrue} +\DeclareOption*{\PackageWarning{youngtab}{% + Unknown option `\CurrentOption' (Known:\MessageBreak + `vcentermath', `noautoscale', `stdtext', `enableskew'.)}} +\ProcessOptions\relax +\def\y@vr{\vrule height0.8\y@b@xdim width\y@linethick depth 0.2\y@b@xdim} +\def\y@emptybox{\y@vr\hbox to \y@b@xdim{\hfil}} +\ify@enable@skew + \def\y@abcbox#1{\if :#1\else + \y@vr\hbox to \y@b@xdim{\hfil#1\hfil}\fi} + \def\y@mathabcbox#1{\if :#1\else + \y@vr\hbox to \y@b@xdim{\hfil$#1$\hfil}\fi} +\else + \def\y@abcbox#1{\y@vr\hbox to \y@b@xdim{\hfil#1\hfil}} + \def\y@mathabcbox#1{\y@vr\hbox to \y@b@xdim{\hfil$#1$\hfil}} +\fi +\def\y@setdim{% + \ify@autoscale% + \ifvoid1\else\typeout{Package youngtab: box1 not free! Expect an + error!}\fi% + \setbox1=\hbox{A}\y@b@xdim=1.6\ht1 \setbox1=\hbox{}\box1% + \else\y@b@xdim=\y@boxdim \advance\y@b@xdim by -2\y@linethick + \fi} +\newcount\y@counter +\newif\ify@islastarg +\def\y@lastargtest#1,#2 {\if\space #2 \y@islastargtrue + \else\y@islastargfalse\fi} +\def\y@emptyboxes#1{\y@counter=#1\loop\ifnum\y@counter>0 + \advance\y@counter by -1 \y@emptybox\repeat} +\def\y@nelineemptyboxes#1{% + \vbox{% + \hrule height\y@linethick% + \hbox{\y@emptyboxes{#1}\y@vr} + \hrule height\y@linethick}\vspace{-\y@linethick}} +\def\yng(#1){% + \y@setdim% + \hspace{\y@interspace}% + \ifmmode\ify@vcenter\vcenter\fi\fi{% + \y@lastargtest#1, + \vbox{\offinterlineskip + \ify@islastarg + \y@nelineemptyboxes{#1} + \else + \y@ungempty(#1) + \fi}}\hspace{\y@interspace}} +\def\y@ungempty(#1,#2){% + \y@nelineemptyboxes{#1} + \y@lastargtest#2, + \ify@islastarg + \y@nelineemptyboxes{#2} + \else + \y@ungempty(#2) + \fi} +\def\y@nelettertest#1#2. {\if\space #2 \y@islastargtrue + \else\y@islastargfalse\fi} +\def\y@abcboxes#1#2.{% + \ify@stdtext\y@abcbox#1\else\y@mathabcbox#1\fi% + \y@nelettertest #2. + \ify@islastarg\unskip% + \ify@stdtext\y@abcbox{#2}\else\y@mathabcbox{#2}\fi% + \else\y@abcboxes#2.\fi} +\ify@enable@skew + \newdimen\y@full@b@xdim + \newcount\y@m@veright@cnt + \def\y@get@m@veright@cnt#1#2.{% + \if :#1 \advance\y@m@veright@cnt by 1\y@get@m@veright@cnt#2.\fi} + \let\y@setdim@=\y@setdim + \def\y@setdim{% + \y@setdim@ \y@full@b@xdim=\y@b@xdim + \advance\y@full@b@xdim by 1\y@linethick} + \def\y@m@veright@ifskew#1{ + \y@m@veright@cnt=0 \y@get@m@veright@cnt#1. + \moveright \y@m@veright@cnt\y@full@b@xdim} +\else + \def\y@m@veright@ifskew#1{} +\fi +\def\y@nelineabcboxes#1{% + \y@nelettertest #1. + \ify@islastarg + \y@m@veright@ifskew{#1} + \vbox{ + \hrule height\y@linethick% + \hbox{\ify@stdtext\y@abcbox#1\else\y@mathabcbox#1\fi\y@vr} + \hrule height\y@linethick}\vspace{-\y@linethick} + \else + \y@m@veright@ifskew{#1} + \vbox{ + \hrule height\y@linethick% + \hbox{\y@abcboxes #1.\y@vr}% + \hrule height\y@linethick}\vspace{-\y@linethick} + \fi} +\def\young(#1){% + \y@setdim% + \hspace{\y@interspace}% + \y@lastargtest#1, + \ifmmode\ify@vcenter\vcenter\fi\fi{% + \vbox{\offinterlineskip + \ify@islastarg\y@nelineabcboxes{#1}% + \else\y@ungabc(#1)% + \fi}}\hspace{\y@interspace}} +\def\y@ungabc(#1,#2){% + \y@nelineabcboxes{#1}% + \y@lastargtest#2, + \ify@islastarg\y@nelineabcboxes{#2}% + \else\y@ungabc(#2)% + \fi} +\endinput +%% +%% End of file `youngtab.sty'. -- cgit v1.2.3