summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-02 15:22:14 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-02 15:22:14 +0000
commitcde29f66cd4a655133f329e7d4339e3fcaf8b1cf (patch)
treef875581f7f936f8b0594838d49f37021b22553f2 /Master
parent295d66c308b9c4726a953aead8658b20c32db816 (diff)
ecltree with new pdf entering tlpkg-ctan-check
git-svn-id: svn://tug.org/texlive/trunk@8491 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/ecltree/ecltreesample.pdfbin0 -> 39387 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ecltree/ecltreesample.tex248
-rw-r--r--Master/texmf-dist/tex/latex/ecltree/eclbip.sty112
-rw-r--r--Master/texmf-dist/tex/latex/ecltree/ecltree.sty34
4 files changed, 269 insertions, 125 deletions
diff --git a/Master/texmf-dist/doc/latex/ecltree/ecltreesample.pdf b/Master/texmf-dist/doc/latex/ecltree/ecltreesample.pdf
new file mode 100644
index 00000000000..0d4baf5efc4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ecltree/ecltreesample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/ecltree/ecltreesample.tex b/Master/texmf-dist/doc/latex/ecltree/ecltreesample.tex
new file mode 100644
index 00000000000..ef0b9746cc4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ecltree/ecltreesample.tex
@@ -0,0 +1,248 @@
+\documentclass{article}
+\usepackage{epic,eepic,ecltree}
+
+\title{A tree macro}
+
+\author{Hideki ISOZAKI\\NTT Basic Research Labs \& Stanford Univ.}
+
+\date{Nov. 30, 1990}
+
+
+\addtolength{\textwidth}{12pt}
+
+\begin{document}
+
+\maketitle
+
+
+\section{Setup}
+
+Include epic.sty and ecltree.sty\footnote{Electrical Communications Labs}
+in your document as below:
+\begin{verbatim}
+\documentclass{article}
+\usepackage{epic,ecltree}
+\end{verbatim}
+If your printer driver accepts tpic commands,
+you should specify eepic.sty after epic.sty.
+\begin{verbatim}
+\usepackage{epic,eepic,ecltree}
+\end{verbatim}
+As eepic.sty redefines some macros defined in epic.sty,
+Do not reverse this order.
+
+\section{bundle environment}
+
+A tree is drawn by {\it bundle} environment.
+The {\it bundle} environment has one argument.
+This argument specifies the top node label.
+Leaves should be specified by \verb|\chunk| in this environment.
+
+If you write
+\begin{verbatim}
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{bbb}
+\chunk{ccc}
+\end{bundle}
+\end{verbatim}
+you get
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{bbb}
+\chunk{ccc}
+\end{bundle}.
+
+You can nest the {\it bundle} environment.
+If you write
+\begin{verbatim}
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk{ccc}
+\end{bundle}
+\end{verbatim}
+you get
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk{ccc}
+\end{bundle}.
+
+\section{Line attribute}
+
+You can draw not only solid lines but also
+dotted lines and dash lines.
+epic.sty and eepic.sty define several commands for them.
+If you want to use
+\begin{verbatim}
+\dashline[65]{3}(x1,y1)(x2,y2)
+\end{verbatim}
+to draw lines, use \verb|\drawwith| command
+before (or in) the bundle environment.
+\begin{verbatim}
+\drawwith{\dashline[65]{3}}
+\end{verbatim}
+
+\drawwith{\dashline[65]{3}}
+Then you get
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk{ccc}
+\end{bundle}.
+
+The argument of \verb|\drawwith| is evaluated
+at \verb|\end{bundle}|. Hence, if you write
+\begin{verbatim}
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \drawwith{\drawline}
+ \chunk{bbb}
+ \drawwith{\dashline[65]{3}}
+ \chunk{ddd}
+ \end{bundle}}
+\drawwith{\dottedline{3}}
+\chunk{ccc}
+\end{bundle}
+\end{verbatim}
+you get
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \drawwith{\drawline}
+ \chunk{bbb}
+ \drawwith{\dashline[65]{3}}
+ \chunk{ddd}
+ \end{bundle}}
+\drawwith{\dottedline{3}}
+\chunk{ccc}
+\end{bundle}.
+
+You can nest the \verb|\drawwith|. If you write
+\begin{verbatim}
+\drawwith{\drawwith{\drawwith{\dottedline{3}}\drawline}\dashline{3}}
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \chunk{eee}
+ \end{bundle}}
+\chunk{ccc}
+\chunk{fff}
+\end{bundle}
+\end{verbatim}
+you get
+\drawwith{\drawwith{\drawwith{\dottedline{3}}\drawline}\dashline{3}}
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \chunk{eee}
+ \end{bundle}}
+\chunk{ccc}
+\chunk{fff}
+\end{bundle}.
+Thus the nested \verb|\drawwith| is used in the reverse order.
+
+\section{Edge labels}
+
+You can write edge labels. They should be specified as the optional
+argument of \verb|\chunk|. Note that the width of an edge label
+is neglected. If you write
+\drawwith{\drawline}
+\begin{verbatim}
+\begin{bundle}{xxx}
+\chunk[left]{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk[right]{ccc}
+\end{bundle}
+\end{verbatim}
+you get
+\begin{bundle}{xxx}
+\chunk[left]{aaa}
+\chunk{
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk[right]{ccc}
+\end{bundle}.
+
+
+\section{Spacing}
+
+The {\it bundle} environment
+has three parameters for spacing.
+
+\begin{itemize}
+
+\item \verb|\GapDepth| means minimum height of gaps between
+adjacent nodes.
+
+\item \verb|\GapWidth| means minimum width of gaps between
+adjacent nodes.
+
+\item \verb|\EdgeLabelSep| means height of an edge label
+from the lower node of the edge.
+
+\end{itemize}
+
+You should set these parameters before the {\tt bundle} environment
+if you dislike default values.
+
+If you write
+\begin{verbatim}
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \setlength{\GapDepth}{5pt}
+ \setlength{\GapWidth}{5pt}
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk{ccc}
+\end{bundle}
+\end{verbatim}
+you get
+\begin{bundle}{xxx}
+\chunk{aaa}
+\chunk{
+ \setlength{\GapDepth}{5pt}
+ \setlength{\GapWidth}{5pt}
+ \begin{bundle}{yyy}
+ \chunk{bbb}
+ \chunk{ddd}
+ \end{bundle}}
+\chunk{ccc}
+\end{bundle}.
+
+
+
+
+\end{document}
+
diff --git a/Master/texmf-dist/tex/latex/ecltree/eclbip.sty b/Master/texmf-dist/tex/latex/ecltree/eclbip.sty
deleted file mode 100644
index 478ecd2bcc5..00000000000
--- a/Master/texmf-dist/tex/latex/ecltree/eclbip.sty
+++ /dev/null
@@ -1,112 +0,0 @@
-% eclbip.sty (C) Hideki ISOZAKI Nov. 24, 1990
-% \ignorespaces Dec.2, 1990
-% draw a bipartite graph with epic.sty
-
-\typeout{ECL Bipartite graph style file by isozaki Dec.2, 1990}
-
-\endlinechar=-1\relax
-\makeatletter
-
-\newdimen\bip@len
-\newbox\bip@box
-
-% #1...Width of Left Node Group
-% #2...Width of Gap between Left Node Group and Right Node Group
-% #3...Width of Right Node Group
-% #4...Height of Vertical Gap between Nodes
-% #5...Width of a Bullet and its Label
-
-\def\bipartite#1#2#3#4#5{
- \bip@init\bip@sep{#4}
- \bip@init\bip@lW{#1}
- \bip@init\bip@eW{#2}
- \bip@init\bip@rW{#3}
- \let\bip@lX=\bip@lW
- \bip@init\bip@rX{\bip@lX\p@}\bip@add\bip@rX{#2}
- \bip@init\bip@tX{\bip@rX\p@}\bip@add\bip@tX{#3}
- \bip@init\bip@lY{\z@}
- \bip@init\bip@rY{\z@}
- \xdef\bip@bot{0.0}
- \bip@init\bip@elX{\bip@lX\p@}
- \bip@add\bip@elX{#5}
- \bip@init\bip@erX{\bip@rX\p@}
- \bip@add\bip@erX{-#5}
- \unitlength=\p@
- \def\endbipartite{\endpicture
- \hbox{\vrule\@depth\bip@bot\p@\@height\z@\@width\z@}}
- \picture(\bip@tX,0)(0,0)\ignorespaces}
-
-%
-% \leftnode[#1]{#2}
-% #1=label, #2=content
-%
-% \leftnode{#1}=\leftnode[#1]{#1}
-%
-
-\def\leftnode{\@dblarg{\@leftnode}}
-
-\def\@leftnode[#1]#2{
- \setbox\bip@box=\hbox to \z@{\hss
- \@iparbox[c]{\bip@lW\p@}{\raggedleft #2}}
- \bip@init\bip@halfH{-.5\ht\bip@box}
- \bip@add\bip@halfH{-.5\dp\bip@box}
- \bip@init\bip@corrY{\bip@halfH\p@}
- \bip@add\bip@corrY{\dp\bip@box}
- \bip@add\bip@lY{\bip@halfH\p@}
- \put(\bip@lX,\bip@lY){\raise\bip@corrY\p@\box\bip@box}
- \put(\bip@elX,\bip@lY){\makebox(0,0){$\bullet$}}
- \expandafter\edef\csname bip@L#1\endcsname{\bip@lY}
- \bip@add\bip@lY{\bip@halfH\p@}
- \bip@max\bip@bot{-\bip@lY\p@}
- \bip@add\bip@lY{-\bip@sep\p@}\ignorespaces}
-
-\def\rightnode{\@dblarg{\@rightnode}}
-
-\def\@rightnode[#1]#2{
- \setbox\bip@box=\hbox to \z@{
- \@iparbox[c]{\bip@rW\p@}{\raggedright #2}\hss}
- \bip@init\bip@halfH{-.5\ht\bip@box}
- \bip@add\bip@halfH{-.5\dp\bip@box}
- \bip@init\bip@corrY{\bip@halfH\p@}
- \bip@add\bip@corrY{\dp\bip@box}
- \bip@add\bip@rY{\bip@halfH\p@}
- \put(\bip@rX,\bip@rY){\raise\bip@corrY\p@\box\bip@box}
- \put(\bip@erX,\bip@rY){\makebox(0,0){$\bullet$}}
- \expandafter\edef\csname bip@R#1\endcsname{\bip@rY}
- \bip@add\bip@rY{\bip@halfH\p@}
- \bip@max\bip@bot{-\bip@rY\p@}
- \bip@add\bip@rY{-\bip@sep\p@}\ignorespaces}
-
-%
-% Draw Edges between Nodes
-%
-
-\def\brush#1{\def\bip@brush{#1}\ignorespaces}
-\brush{\drawline}
-
-\def\match#1#2{
- \bip@brush(\bip@elX,\@nameuse{bip@L#1})(\bip@erX,\@nameuse{bip@R#2})
- \ignorespaces}
-
-%
-% (1) Avoidance of too much use of dimen.
-% (2) Easy conversion between picture coord and real dimen
-% ---> Keep dimen without 'pt'
-%
-
-\def\bip@init#1#2{\bip@len=#2\relax
- \edef#1{\expandafter\@RemoveDim\the\bip@len}}
-
-\def\bip@add#1#2{\bip@len=#1\p@\relax\advance\bip@len by #2\relax
- \edef#1{\expandafter\@RemoveDim\the\bip@len}}
-
-\def\bip@max#1#2{\bip@len=#1\p@\relax
- \ifdim\bip@len<#2\relax\bip@len=#2
- \xdef#1{\expandafter\@RemoveDim\the\bip@len}\fi}
-
-{\catcode`\p=12 \catcode`\t=12
-\gdef\@RemoveDim#1pt{#1}}
-
-\endlinechar=13\relax
-
-\endinput
diff --git a/Master/texmf-dist/tex/latex/ecltree/ecltree.sty b/Master/texmf-dist/tex/latex/ecltree/ecltree.sty
index 927f50a54b0..234829c17c5 100644
--- a/Master/texmf-dist/tex/latex/ecltree/ecltree.sty
+++ b/Master/texmf-dist/tex/latex/ecltree/ecltree.sty
@@ -1,14 +1,24 @@
% ecltree.sty (C) hideki isozaki Nov. 12, 1990
+% FMi fix: use \protected@edef instead of \edef (2002/11)
%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.2
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
% In this style file, I intentionally didn't use ordinary
% terms such as \tree, \subtree, \leaf etc.
% because I will use different tree macros in one file.
%
% This macro needs epic.sty
% Confirm your epic.sty does not contain \makeatother at EOF.
+%
\makeatletter
-\typeout{ECL Tree graph macro by isozaki, Nov. 12, 1990}
+\typeout{ECL Tree graph macro by isozaki, Nov. 12, 1990 + 2e FIX}
% Ignore End Of Line
@@ -57,7 +67,7 @@
\def\@TopLabel{#1}
\def\@HandleList{}
\def\@EdgeLabels{}
- \edef\@EdgeLabelsY{\expandafter\@RemoveDim\the\EdgeLabelSep}
+ \protected@edef\@EdgeLabelsY{\expandafter\@RemoveDim\the\EdgeLabelSep}
\unitlength=\p@
\@BundleWidth=\z@
\@BundleHeight=\z@
@@ -72,25 +82,25 @@
\advance\@BundleHeight by \ht\@NodeBox
\advance\@BundleHeight by \dp\@NodeBox
\vrule\@height\@BundleHeight\@width\z@\@depth\@BundleDepth
- \edef\@SupportY{\expandafter\@RemoveDim\the\GapDepth}
- \edef\@SupportX{\expandafter\@RemoveDim\the\@BundleWidth}
+ \protected@edef\@SupportY{\expandafter\@RemoveDim\the\GapDepth}
+ \protected@edef\@SupportX{\expandafter\@RemoveDim\the\@BundleWidth}
\setbox\@NodeBox=\hbox to \z@{\hss\@TopLabel\hss}
\hskip-\@BundleWidth
- \edef\@EdgeLabels{\@EdgeLabels{}}
- \edef\@PicWidth{\expandafter\@RemoveDim\the\@BundleWidth}
+ \protected@edef\@EdgeLabels{\@EdgeLabels{}}
+ \protected@edef\@PicWidth{\expandafter\@RemoveDim\the\@BundleWidth}
\@BundleWidth=0.5\@BundleWidth
- \edef\@SupportX{\expandafter\@RemoveDim\the\@BundleWidth}
+ \protected@edef\@SupportX{\expandafter\@RemoveDim\the\@BundleWidth}
\@DrawBundle}
\def\@DrawBundle{
\begin{picture}(\@PicWidth,0)(0,0)
- \edef\@HandleList{\expandafter\@cdr\@HandleList\@nil}
+ \protected@edef\@HandleList{\expandafter\@cdr\@HandleList\@nil}
\@for\@HandleX:=\@HandleList\do{
\@DrawLine(\@SupportX,\@SupportY)(\@HandleX,0)
\put(\@HandleX,\@EdgeLabelsY){
\makebox(0,0){\expandafter\@car\@EdgeLabels\@nil}}
- \edef\@EdgeLabels{\expandafter\@cdr\@EdgeLabels\@nil}}
+ \protected@edef\@EdgeLabels{\expandafter\@cdr\@EdgeLabels\@nil}}
\put(\@SupportX,\@SupportY){\raise\dp\@NodeBox\box\@NodeBox}
\end{picture}\egroup}
@@ -104,12 +114,12 @@
\def\chunk{\@ifnextchar[{\@chunk}{\@chunk[]}}
-\def\@chunk[#1]#2{\edef\@EdgeLabels{\@EdgeLabels{#1}}
+\def\@chunk[#1]#2{\protected@edef\@EdgeLabels{\@EdgeLabels{#1}}
\setbox\@NodeBox=\vtop{\null\hbox{#2}}
\advance\@BundleWidth by 0.5\wd\@NodeBox
\ifnum\@BundleDepth<\dp\@NodeBox
\@BundleDepth=\dp\@NodeBox\fi
- \edef\@HandleList{\@HandleList,
+ \protected@edef\@HandleList{\@HandleList,
\expandafter\@RemoveDim\the\@BundleWidth}
\advance\@BundleWidth by 0.5\wd\@NodeBox
\advance\@BundleWidth by \GapWidth
@@ -138,5 +148,3 @@
\endlinechar=13\relax
\endinput
-
-