summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dyntree
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-25 18:08:35 +0000
committerKarl Berry <karl@freefriends.org>2006-08-25 18:08:35 +0000
commitdc7f48561076a2447ce7a4e7e0debcfae37b8c2e (patch)
treedb10aa921d41e69554eb722e4980d52c1cf10d87 /Master/texmf-dist/tex/latex/dyntree
parent50990a3a4c2f167320e149cdef49dbba792e298d (diff)
new package dyntree (19aug06)
git-svn-id: svn://tug.org/texlive/trunk@2015 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dyntree')
-rw-r--r--Master/texmf-dist/tex/latex/dyntree/dyntree.sty361
1 files changed, 361 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dyntree/dyntree.sty b/Master/texmf-dist/tex/latex/dyntree/dyntree.sty
new file mode 100644
index 00000000000..1d5109e5a32
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/dyntree/dyntree.sty
@@ -0,0 +1,361 @@
+%%
+%% This is file `dyntree.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% dyntree.dtx (with options: `package')
+%%
+%% This is a generated file
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the GNU Lesser General Product License
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{dyntree}
+ [2006/08/14 v1 Dynkin Tree Typsetting]
+\RequirePackage{coollist}
+\RequirePackage{calc}
+\RequirePackage{epic}
+\RequirePackage{eepic}
+\RequirePackage{amsmath}
+\RequirePackage{amssymb}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+\newlength{\DYNTREE@widechar}%
+\newlength{\DYNTREE@thinchar}%
+\newlength{\DYNTREE@cartancoefwidth}%
+\newlength{\DYNTREE@marginwidth}%
+\newlength{\DYNTREE@colsepwidth}%
+\newlength{\DYNTREE@dynboxheight}%
+\newlength{\DYNTREE@dynboxdepth}%
+\newlength{\DYNTREE@dynboxvlen}%
+\newlength{\DYNTREE@dynboxwidth}%
+\settowidth{\DYNTREE@widechar}{$-1$}%
+\settowidth{\DYNTREE@thinchar}{$1$}%
+\setlength{\DYNTREE@cartancoefwidth}%
+{\DYNTREE@widechar*1/2 + \DYNTREE@thinchar*1/2}%
+\settowidth{\DYNTREE@marginwidth}%
+{$\begin{array}{|c|}\hline 1 \\ \hline \end{array}$}%
+\addtolength{\DYNTREE@marginwidth}{-\DYNTREE@thinchar}%
+\settowidth{\DYNTREE@colsepwidth}%
+{$\begin{array}{|cc|}\hline 1 & 1 \\ \hline \end{array}$}%
+\addtolength{\DYNTREE@colsepwidth}{-\DYNTREE@marginwidth - \DYNTREE@thinchar*2}%
+\settoheight{\DYNTREE@dynboxheight}%
+{$\begin{array}{|c|}\hline 1 \\ \hline \end{array}$}%
+\settodepth{\DYNTREE@dynboxdepth}%
+{$\begin{array}{|c|}\hline 1 \\ \hline \end{array}$}%
+\setlength{\DYNTREE@dynboxvlen}{\DYNTREE@dynboxheight + \DYNTREE@dynboxdepth}%
+\newcounter{DYNTREE@numlevel}%
+\newcounter{DYNTREE@nextlevel}%
+\newcounter{DYNTREE@numboxes}%
+\newcounter{DYNTREE@nextnumboxes}%
+\newcounter{DYNTREE@target}%
+\newcounter{DYNTREE@listlen}%
+\newcounter{DYNTREE@xCoord}%
+\newcounter{DYNTREE@yCoord}%
+\newcounter{DYNTREE@xPos}%
+\newcounter{DYNTREE@yPos}%
+\newcounter{DYNTREE@xComp}%
+\newcounter{DYNTREE@yComp}%
+\newcounter{DYNTREE@leftX}%
+\newcounter{DYNTREE@ct}%
+\newcounter{DYNTREE@counter}%
+\newcounter{DYNTREE@index}%
+\newcounter{DYNTREE@root}%
+\newlength{\DYNTREE@dynboxsep}%
+\newlength{\DYNTREE@levelsep}%
+\newlength{\DYNTREE@leftmostX}%
+\newlength{\DYNTREE@rightmostX}%
+\newlength{\DYNTREE@unitlen}%
+\newlength{\DYNTREE@templen}%
+\newlength{\DYNTREE@holdlen}%
+\newcommand{\DYNTREE@treestop}{\&\&\&}%
+\newcommand{\DYNTREE@treeend}{\%\%\%}%
+\newcommand{\lend}{\&\%\&\%}%
+\newcommand{\dynbox}{}%
+\setlength{\DYNTREE@dynboxsep}{\DYNTREE@colsepwidth}%
+\setlength{\DYNTREE@levelsep}{1cm}%
+\def\DYNTREE@gobbletree#1\lend#2\DYNTREE@treeend{%
+\addtocounter{DYNTREE@numlevel}{1}%
+\setcounter{DYNTREE@numboxes}{0}%
+\setcounter{DYNTREE@nextnumboxes}{0}%
+\DYNTREE@gobbledynboxes#1\lend%
+\expandafter\xdef%
+\csname DYNTREE@level@\roman{DYNTREE@numlevel}@numbox\endcsname%
+{\arabic{DYNTREE@numboxes}}%
+\ifthenelse{ \equal{#2}{\DYNTREE@treestop} }%
+{%
+}%
+{%
+\DYNTREE@gobbletree#2\DYNTREE@treeend%
+}%
+}%
+\def\DYNTREE@gobbledynboxes#1\dynbox#2#3#4{%
+\addtocounter{DYNTREE@numboxes}{1}%
+\expandafter\newbox%
+\csname DYNTREE@box@\roman{DYNTREE@numlevel}@\roman{DYNTREE@numboxes}\endcsname%
+\expandafter\setbox%
+\csname DYNTREE@box@\roman{DYNTREE@numlevel}@\roman{DYNTREE@numboxes}\endcsname=%
+\hbox{$\begin{array}{|*{\DYNTREE@numroots}{c}|}\hline #2 \\ \hline \end{array}$}%
+\listlenstore{DYNTREE@listlen}{#3}%
+\expandafter\xdef
+\csname DYNTREE@childline@\roman{DYNTREE@numlevel}@\roman{DYNTREE@numboxes}@boxnum\endcsname%
+{\arabic{DYNTREE@listlen}}%
+\ifthenelse{\value{DYNTREE@listlen} > \DYNTREE@numroots}%
+{%
+\PackageError{dyntree}%
+{%
+Length of descendant of \arabic{DYNTREE@numboxes}%
+ on level \arabic{DYNTREE@numlevel} exceeds number of roots%
+ (\DYNTREE@numroots)%
+ }%
+}%
+{}%
+\liststore{#3}{DYNTREE@templist@}%
+\liststore{#3}%
+{DYNTREE@childlist@\roman{DYNTREE@numlevel}@\roman{DYNTREE@numboxes}@}%
+\setcounter{DYNTREE@ct}{1}%
+\whiledo{ \NOT \(\value{DYNTREE@ct} > \value{DYNTREE@listlen}\) \AND
+\NOT\(\value{DYNTREE@ct} > \DYNTREE@numroots\) }%
+{%
+\setcounter{DYNTREE@counter}{\csname DYNTREE@templist@\roman{DYNTREE@ct}\endcsname}%
+\ifthenelse{ \(\value{DYNTREE@counter} > \DYNTREE@numroots\) \OR
+\(\value{DYNTREE@counter} < 1\) }%
+{%
+\ifthenelse{\value{DYNTREE@counter} = 0}%
+{%
+}%
+{%
+\PackageError{dyntree}%
+{%
+Descendant root of \arabic{DYNTREE@numboxes} on level%
+ \arabic{DYNTREE@numlevel} out of bounds%
+ (\arabic{DYNTREE@counter} > \DYNTREE@numroots)%
+}%
+}%
+}%
+{%
+\setlength{\DYNTREE@templen}%
+{\csname DYNTREE@level@\roman{DYNTREE@numlevel}@\roman{DYNTREE@numboxes}@X\endcsname}%
+\addtolength{\DYNTREE@templen}%
+{\csname DYNTREE@rootX@\roman{DYNTREE@counter}\endcsname*(-1)}%
+\ifthenelse{\DYNTREE@templen < \DYNTREE@leftmostX}%
+{%
+\setlength{\DYNTREE@leftmostX}{\DYNTREE@templen}%
+}%
+{}%
+\setlength{\DYNTREE@holdlen}{\DYNTREE@templen}%
+\addtolength{\DYNTREE@holdlen}{\DYNTREE@dynboxwidth}%
+\ifthenelse{ \DYNTREE@holdlen > \DYNTREE@rightmostX }%
+{%
+\setlength{\DYNTREE@rightmostX}{\DYNTREE@holdlen}%
+}%
+{}%
+\setlength{\DYNTREE@holdlen}%
+{\expandafter\csname DYNTREE@dynboxX@\roman{DYNTREE@counter}\endcsname}%
+\addtolength{\DYNTREE@holdlen}{\DYNTREE@templen}%
+\setcounter{DYNTREE@xPos}{\DYNTREE@holdlen}%
+\setcounter{DYNTREE@counter}{\value{DYNTREE@nextnumboxes}}%
+\setcounter{DYNTREE@nextlevel}{\value{DYNTREE@numlevel} + 1}%
+\ifthenelse{\value{DYNTREE@counter} = 0}%
+{%
+\expandafter\xdef%
+\csname DYNTREE@level@\roman{DYNTREE@nextlevel}@i@X\endcsname%
+{\the\DYNTREE@templen}%
+\addtocounter{DYNTREE@nextnumboxes}{1}%
+}%
+{%
+\edef\DYNTREE@temparray%
+{\csname DYNTREE@level@\roman{DYNTREE@nextlevel}@\roman{DYNTREE@counter}@X\endcsname}%
+\edef\DYNTREE@tempinsert{\the\DYNTREE@templen}%
+\whiledo{ \(\value{DYNTREE@counter} > 0\) \AND
+\lengthtest{\DYNTREE@tempinsert < \DYNTREE@temparray} }%
+{%
+\edef\DYNTREE@temparray%
+{\csname DYNTREE@level@\roman{DYNTREE@nextlevel}@\roman{DYNTREE@counter}@X\endcsname}%
+\addtocounter{DYNTREE@counter}{-1}%
+}%
+\setcounter{DYNTREE@target}{\value{DYNTREE@counter} + 1}%
+\ifthenelse{ \NOT \lengthtest{\DYNTREE@tempinsert = \DYNTREE@temparray} }%
+{%
+\setcounter{DYNTREE@counter}{\value{DYNTREE@nextnumboxes} + 1}%
+\whiledo{ \value{DYNTREE@counter} > \value{DYNTREE@target} }%
+{%
+\addtocounter{DYNTREE@counter}{-1}%
+\edef\DYNTREE@tempswap%
+{%
+\csname DYNTREE@level@\roman{DYNTREE@nextlevel}@\roman{DYNTREE@counter}@X\endcsname%
+}%
+\addtocounter{DYNTREE@counter}{1}%
+\expandafter\xdef%
+\csname DYNTREE@level@\roman{DYNTREE@nextlevel}@\roman{DYNTREE@counter}@X\endcsname%
+{\DYNTREE@tempswap}%
+\addtocounter{DYNTREE@counter}{-1}%
+}%
+\expandafter\xdef%
+\csname DYNTREE@level@\roman{DYNTREE@nextlevel}@\roman{DYNTREE@target}@X\endcsname%
+{\DYNTREE@tempinsert}%
+\addtocounter{DYNTREE@nextnumboxes}{1}%
+}%
+{%
+}%
+}%
+}%
+\addtocounter{DYNTREE@ct}{1}%
+}%
+\ifthenelse{\equal{#4}{\lend}}%
+{%
+}%
+{%
+%% Eat the boxes until there are no more
+\DYNTREE@gobbledynboxes#4%
+}%
+}%
+\def\start#1#2#3\finish#4%
+{%
+\ifthenelse{\equal{#1}{#4} \AND \equal{#4}{dyntree}}%
+{%
+\providecommand{\DYNTREE@numroots}{#2}%
+\setlength{\DYNTREE@dynboxwidth}
+{%
+\DYNTREE@marginwidth +
+\DYNTREE@cartancoefwidth*\DYNTREE@numroots +
+\DYNTREE@colsepwidth*(\DYNTREE@numroots-1)
+}%
+\setlength{\DYNTREE@leftmostX}{0pt}%
+\setlength{\DYNTREE@rightmostX}{\DYNTREE@dynboxwidth}%
+\expandafter\gdef\csname DYNTREE@level@i@i@X\endcsname{0pt}%
+\setcounter{DYNTREE@numlevel}{0}%
+\setcounter{DYNTREE@ct}{1}%
+\whiledo{\NOT \(\value{DYNTREE@ct}>\DYNTREE@numroots\)}%
+{%
+\setlength{\DYNTREE@templen}%
+{%
+ (\DYNTREE@dynboxwidth + \DYNTREE@dynboxsep)*\value{DYNTREE@ct}%
+ -(\DYNTREE@dynboxwidth + \DYNTREE@dynboxsep)*1/2%
+ -(\DYNTREE@dynboxwidth + \DYNTREE@dynboxsep)*\DYNTREE@numroots/2%
+}%
+\expandafter\xdef\csname DYNTREE@rootX@\roman{DYNTREE@ct}\endcsname%
+{\the\DYNTREE@templen}%
+\setlength{\DYNTREE@templen}%
+{%
+\DYNTREE@dynboxwidth/2/\DYNTREE@numroots +
+\DYNTREE@dynboxwidth*(\value{DYNTREE@ct}-1)/\DYNTREE@numroots
+}%
+\expandafter\xdef\csname DYNTREE@dynboxX@\roman{DYNTREE@ct}\endcsname%
+{\the\DYNTREE@templen}%
+\addtocounter{DYNTREE@ct}{1}%
+}%
+\DYNTREE@gobbletree#3\DYNTREE@treestop\DYNTREE@treeend%
+\setlength{\DYNTREE@unitlen}{\unitlength}%
+\setlength{\unitlength}{1sp}%
+\setcounter{DYNTREE@xCoord}{\DYNTREE@rightmostX - \DYNTREE@leftmostX}%
+\setcounter{DYNTREE@leftX}{\DYNTREE@leftmostX}%
+\setcounter{DYNTREE@yCoord}%
+{%
+\DYNTREE@dynboxvlen*\value{DYNTREE@numlevel} +
+\DYNTREE@levelsep*(\value{DYNTREE@numlevel} - 1)
+}%
+\begin{picture}%
+(\arabic{DYNTREE@xCoord},\arabic{DYNTREE@yCoord})%
+(\value{DYNTREE@leftX},0)%
+\setcounter{DYNTREE@ct}{1}%
+\whiledo{\NOT \(\value{DYNTREE@ct} > \value{DYNTREE@numlevel}\)}%
+{%
+\setcounter{DYNTREE@counter}{1}%
+\setlength{\DYNTREE@templen}%
+{%
+ \DYNTREE@dynboxvlen*\value{DYNTREE@numlevel}
+- \DYNTREE@dynboxvlen*\value{DYNTREE@ct}
++ \DYNTREE@levelsep*\value{DYNTREE@numlevel}
+- \DYNTREE@levelsep*\value{DYNTREE@ct}
++ \DYNTREE@dynboxdepth
+}%
+\setcounter{DYNTREE@yCoord}{\DYNTREE@templen}%
+\def\DYNTREE@tempboxnum{\csname DYNTREE@level@\roman{DYNTREE@ct}@numbox\endcsname}%
+\whiledo{\NOT \( \value{DYNTREE@counter} > \DYNTREE@tempboxnum \)}%
+{%
+\xdef\DYNTREE@tempxCoord%
+{%
+\expandafter%
+\csname DYNTREE@level@\roman{DYNTREE@ct}@\roman{DYNTREE@counter}@X\endcsname%
+}%
+\setlength{\DYNTREE@holdlen}{\DYNTREE@tempxCoord}%
+\setcounter{DYNTREE@xCoord}{\DYNTREE@holdlen}%
+\put(\arabic{DYNTREE@xCoord},\arabic{DYNTREE@yCoord})%
+{%
+\expandafter%
+\copy\csname DYNTREE@box@\roman{DYNTREE@ct}@\roman{DYNTREE@counter}\endcsname%
+}%
+\setcounter{DYNTREE@listlen}%
+{%
+\expandafter%
+\csname DYNTREE@childline@\roman{DYNTREE@ct}@\roman{DYNTREE@counter}@boxnum\endcsname%
+}%
+\setcounter{DYNTREE@index}{1}%
+\whiledo{\NOT \(\value{DYNTREE@index} > \value{DYNTREE@listlen}\)}%
+{%
+\xdef\DYNTREE@childroot%
+{%
+\expandafter%
+\csname DYNTREE@childlist@\roman{DYNTREE@ct}@\roman{DYNTREE@counter}@\roman{DYNTREE@index}\endcsname%
+}%
+\ifthenelse{\NOT \DYNTREE@childroot = 0 }%
+{%
+\setcounter{DYNTREE@root}{\DYNTREE@childroot}%
+\setcounter{DYNTREE@xPos}{\value{DYNTREE@xCoord}}%
+\setcounter{DYNTREE@xComp}{\value{DYNTREE@xCoord}}%
+\setcounter{DYNTREE@yPos}{\value{DYNTREE@yCoord}}%
+\setcounter{DYNTREE@yComp}{\value{DYNTREE@yCoord}}%
+\xdef\DYNTREE@temprootX%
+{\expandafter\csname DYNTREE@rootX@\roman{DYNTREE@root}\endcsname}%
+\setlength{\DYNTREE@templen}{\DYNTREE@temprootX}%
+\addtocounter{DYNTREE@xPos}{\DYNTREE@templen*(-1)}%
+\xdef\DYNTREE@dynoffset%
+{\expandafter\csname DYNTREE@dynboxX@\roman{DYNTREE@root}\endcsname}%
+\setlength{\DYNTREE@templen}{\DYNTREE@dynoffset}%
+\addtocounter{DYNTREE@xPos}{\DYNTREE@templen}%
+\addtocounter{DYNTREE@xComp}{\DYNTREE@templen}%
+\setlength{\DYNTREE@templen}{1pt}% for frame thickness
+\addtocounter{DYNTREE@yPos}%
+{\DYNTREE@levelsep*(-1) - \DYNTREE@dynboxdepth - \DYNTREE@templen}%
+\addtocounter{DYNTREE@yComp}{\DYNTREE@dynboxdepth*(-1) - \DYNTREE@templen}%
+\put(0,0)%
+{%
+\drawline%
+(\arabic{DYNTREE@xComp},\arabic{DYNTREE@yComp})%
+(\arabic{DYNTREE@xPos},\arabic{DYNTREE@yPos})%
+}%
+}%
+{%
+}%
+\addtocounter{DYNTREE@index}{1}%
+}%
+\addtocounter{DYNTREE@counter}{1}%
+}%
+\addtocounter{DYNTREE@ct}{1}%
+}%
+\end{picture}%
+\setlength{\unitlength}{\DYNTREE@unitlen}%
+}%
+{%
+\PackageError{dyntree}{Invalid start(#1)/finish(#4) call}%
+}%
+}%
+\endinput
+%%
+%% End of file `dyntree.sty'.