texlive[71382] Master: treesvr (denisb request, 28may24)

commits+karl at tug.org commits+karl at tug.org
Tue May 28 22:11:43 CEST 2024


Revision: 71382
          https://tug.org/svn/texlive?view=revision&revision=71382
Author:   karl
Date:     2024-05-28 22:11:43 +0200 (Tue, 28 May 2024)
Log Message:
-----------
treesvr (denisb request, 28may24)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/treesvr/
    trunk/Master/texmf-dist/doc/latex/treesvr/legal.txt
    trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.latex209
    trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.pdf
    trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.tex
    trunk/Master/texmf-dist/tex/latex/treesvr/
    trunk/Master/texmf-dist/tex/latex/treesvr/trees.sty
    trunk/Master/tlpkg/tlpsrc/treesvr.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/treesvr/legal.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/treesvr/legal.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/treesvr/legal.txt	2024-05-28 20:11:43 UTC (rev 71382)
@@ -0,0 +1,14 @@
+The files of this package "treesvr" 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.
+
+The complete listing of files covered by this license is
+  treedoc.latex209
+  treedoc.tex
+  trees.sty
+
+May 2002, Reinhard Zierke with permission of the copyright owner.


Property changes on: trunk/Master/texmf-dist/doc/latex/treesvr/legal.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.latex209
===================================================================
--- trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.latex209	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.latex209	2024-05-28 20:11:43 UTC (rev 71382)
@@ -0,0 +1,65 @@
+\documentstyle[trees,a4]{article}
+
+\title{{\tt trees.sty}: A Macro for Drawing Binary \\
+       or Ternary Trees}
+
+\author{Peter Vanroose \\
+        Peter.Vanroose at esat.kuleuven.ac.be}
+
+\date{18 april 1990}
+
+\begin{document}
+
+\maketitle
+
+The following macros let you draw a (binary or ternary) tree of any size. 
+For each "internal node", you only have to specify which are the descending
+nodes, with a \verb|\branch| command (\verb|\tbranch| for ternary node.).
+To this end, nodes are given a label (only used internally!).  These macros
+will give you some ideas on designing similar things for, e.g., 
+digital circuits. 
+ 
+Trees are constructed with labels on the branches (default 0 and 1), and 
+with text (e.g., its name or value) on the nodes.  The first parameter to
+\verb|\branch| (0, 1, 2 or 3) determines the steepness of the branches.
+ 
+Example:
+\small
+\begin{verbatim} 
+\begin{picture}(100,100)(-50,10)
+\unitlength=2mm
+\branchlabels ABC       % 012 is the default
+\root(2,10) 0.          % root at absolute coordinate (2,10) 
+                        % its (internally used) label is 0
+                        % the space before the 0 is obligatory
+\branch2{16} 0:1,2.     % node 0 (i.e., the root) has children 1 and 2
+                        % the text "1.00" is written above it
+                        % space is optional, :,. are obligatory 
+  \leaf{4}{$u_1$} 1.    % node 1 is a leaf
+                        % "0.45" written above, "$u_1$" to the right
+  \branch2{12} 2:3,7.   % branch to node 3 goes up, and has label A
+    \tbranch2{9} 3:4,5,6.
+      \leaf{4}{$u_3$}4. % the symbols 0--7 can be replaced by anything
+      \leaf{3}{$u_4$}5.
+      \leaf{2}{$u_5$}6.
+    \leaf{3}{$u_2$}  7.
+\end{picture}
+\end{verbatim} 
+\normalsize
+will typeset something like:
+\begin{flushleft}
+\begin{picture}(100,100)(-50,10)
+\unitlength=2mm
+\branchlabels ABC
+\root(2,10)          0.
+\branch2{16}         0:1,2.
+  \leaf{4}{$u_1$}    1.
+  \branch2{12}       2:3,7.
+    \tbranch2{9}     3:4,5,6.
+      \leaf{4}{$u_3$}4.
+      \leaf{3}{$u_4$}5.
+      \leaf{2}{$u_5$}6.
+    \leaf{3}{$u_2$}  7.
+\end{picture}
+\end{flushleft}
+\end{document}

Added: trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.pdf	2024-05-28 20:06:27 UTC (rev 71381)
+++ trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.pdf	2024-05-28 20:11:43 UTC (rev 71382)

Property changes on: trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.tex	2024-05-28 20:11:43 UTC (rev 71382)
@@ -0,0 +1,66 @@
+\documentclass{article}
+\usepackage{trees}
+\usepackage{a4}
+
+\title{{\tt trees.sty}: A Macro for Drawing Binary \\
+       or Ternary Trees}
+
+\author{Peter Vanroose \\
+        Peter.Vanroose at esat.kuleuven.ac.be}
+\date{18 april 1990}
+
+\begin{document}
+
+\maketitle
+
+The following macros let you draw a (binary or ternary) tree of any size. 
+For each "internal node", you only have to specify which are the descending
+nodes, with a \verb|\branch| command (\verb|\tbranch| for ternary node.).
+To this end, nodes are given a label (only used internally!).  These macros
+will give you some ideas on designing similar things for, e.g., 
+digital circuits. 
+ 
+Trees are constructed with labels on the branches (default 0 and 1), and 
+with text (e.g., its name or value) on the nodes.  The first parameter to
+\verb|\branch| (0, 1, 2 or 3) determines the steepness of the branches.
+ 
+Example:
+\small
+\begin{verbatim} 
+\begin{picture}(100,100)(-50,10)
+\unitlength=2mm
+\branchlabels ABC       % 012 is the default
+\root(2,10) 0.          % root at absolute coordinate (2,10) 
+                        % its (internally used) label is 0
+                        % the space before the 0 is obligatory
+\branch2{16} 0:1,2.     % node 0 (i.e., the root) has children 1 and 2
+                        % the text "1.00" is written above it
+                        % space is optional, :,. are obligatory 
+  \leaf{4}{$u_1$} 1.    % node 1 is a leaf
+                        % "0.45" written above, "$u_1$" to the right
+  \branch2{12} 2:3,7.   % branch to node 3 goes up, and has label A
+    \tbranch2{9} 3:4,5,6.
+      \leaf{4}{$u_3$}4. % the symbols 0--7 can be replaced by anything
+      \leaf{3}{$u_4$}5.
+      \leaf{2}{$u_5$}6.
+    \leaf{3}{$u_2$}  7.
+\end{picture}
+\end{verbatim} 
+\normalsize
+will typeset something like:
+\begin{flushleft}
+\begin{picture}(100,100)(-50,10)
+\unitlength=2mm
+\branchlabels ABC
+\root(2,10)          0.
+\branch2{16}         0:1,2.
+  \leaf{4}{$u_1$}    1.
+  \branch2{12}       2:3,7.
+    \tbranch2{9}     3:4,5,6.
+      \leaf{4}{$u_3$}4.
+      \leaf{3}{$u_4$}5.
+      \leaf{2}{$u_5$}6.
+    \leaf{3}{$u_2$}  7.
+\end{picture}
+\end{flushleft}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/treesvr/treedoc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/treesvr/trees.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/treesvr/trees.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/treesvr/trees.sty	2024-05-28 20:11:43 UTC (rev 71382)
@@ -0,0 +1,86 @@
+%---------- trees.sty --------------------
+% Peter Vanroose, 18 april 1990.
+\newcount\branchwidth\newcount\xcoord\newcount\ycoord\newcount\coordstep
+\def\branchlabels#1#2#3{\edef\labela{#1}\edef\labelb{#2}\edef\labelc{#3}}
+\branchlabels012
+%
+\def\root(#1,#2) #3.{\catcode32=9       % ignore spaces
+              %  #3 is the node label of the root
+ \expandafter\xdef\csname nodex#3\endcsname{#1}
+ \expandafter\xdef\csname nodey#3\endcsname{#2}
+ \put(#1,#2){
+  \put(0,0){\line(-1,0)6}\put(-6,0){\line(0,-1)3}\put(-9,-3){\line(1,0)6}}}
+%
+\def\branch#1#2#3:#4,#5.{ \branchwidth=#1
+ \xcoord=\expandafter\number\csname nodex#3\endcsname
+ \ycoord=\expandafter\number\csname nodey#3\endcsname
+ \edef\coord{(\number\xcoord,\number\ycoord)}
+ \advance\xcoord by 12      %  #4,#5 are the labels of the childs
+ \expandafter\xdef\csname nodex#4\endcsname{\number\xcoord}
+ \expandafter\xdef\csname nodex#5\endcsname{\number\xcoord}
+ \ifcase\branchwidth
+  \advance\ycoord by 24\coordstep=-48 \or % case 0
+  \advance\ycoord by 12\coordstep=-24 \or % case 1
+  \advance\ycoord by  6\coordstep=-12 \or % case 2
+  \advance\ycoord by  3\coordstep=- 6 \fi % case 3
+ \expandafter\xdef\csname nodey#4\endcsname{\number\ycoord}
+ \advance\ycoord by \coordstep
+ \expandafter\xdef\csname nodey#5\endcsname{\number\ycoord}
+ \expandafter\put\coord{
+  \put(0,0){\circle*1}\put(0,1.5){\makebox(0,0){\scriptsize #2}}
+  \ifcase\branchwidth
+   \put(0,0){\line(1,2){12}}\put(0,0){\line(1,-2){12}}
+   \put(5,12){\tiny$\labela$}\put(5,-12){\tiny$\labelb$} \or % case 0
+   \put(0,0){\line(1,1){12}}\put(0,0){\line(1,-1){12}}
+   \put(6,7){\tiny$\labela$}\put(6,-8){\tiny$\labelb$}   \or % case 1
+   \put(0,0){\line(2,1){12}}\put(0,0){\line(2,-1){12}}
+   \put(6,3.6){\tiny$\labela$}\put(6,-5){\tiny$\labelb$} \or % case 2
+   \put(0,0){\line(4,1){12}}\put(0,0){\line(4,-1){12}}
+   \put(6,2){\tiny$\labela$}\put(6,-3){\tiny$\labelb$}   \fi % case 3
+}}
+%
+\def\tbranch#1#2#3:#4,#5,#6.{
+ \branchwidth=#1
+ \xcoord=\expandafter\number\csname nodex#3\endcsname
+ \ycoord=\expandafter\number\csname nodey#3\endcsname
+ \edef\coord{(\number\xcoord,\number\ycoord)}
+ \advance\xcoord by 12
+ \expandafter\xdef\csname nodex#4\endcsname{\number\xcoord}
+ \expandafter\xdef\csname nodex#5\endcsname{\number\xcoord}
+ \expandafter\xdef\csname nodex#6\endcsname{\number\xcoord}
+ \ifcase\branchwidth
+  \advance\ycoord by 24\coordstep=-24 \or % case 0
+  \advance\ycoord by 12\coordstep=-12 \or % case 1
+  \advance\ycoord by  6\coordstep= -6 \or % case 2
+  \advance\ycoord by  3\coordstep= -3 \fi % case 3
+ \expandafter\xdef\csname nodey#4\endcsname{\number\ycoord}
+ \advance\ycoord by \coordstep
+ \expandafter\xdef\csname nodey#5\endcsname{\number\ycoord}
+ \advance\ycoord by \coordstep
+ \expandafter\xdef\csname nodey#6\endcsname{\number\ycoord}
+ \expandafter\put\coord{
+  \put(0,0){\circle*1}\put(0,1.5){\makebox(0,0){\scriptsize #2}}
+  \ifcase\branchwidth
+   \put(0,0){\line(1,2){12}}\put(0,0){\line(1,0){12}}\put(0,0){\line(1,-2){12}}
+   \put(5,12){\tiny$\labela$}\put(5,0.6){\tiny$\labelb$}\put
+     (5,-12){\tiny$\labelc$} \or % case 0
+   \put(0,0){\line(1,1){12}}\put(0,0){\line(1,0){12}}\put(0,0){\line(1,-1){12}}
+   \put(6,7){\tiny$\labela$}\put(6,0.5){\tiny$\labelb$}\put
+     (6,-8){\tiny$\labelc$}  \or % case 1
+   \put(0,0){\line(2,1){12}}\put(0,0){\line(1,0){12}}\put(0,0){\line(2,-1){12}}
+   \put(6,3.6){\tiny$\labela$}\put(6,0.5){\tiny$\labelb$}\put
+     (6,-5){\tiny$\labelc$}  \or % case 2
+   \put(0,0){\line(4,1){12}}\put(0,0){\line(1,0){12}}\put(0,0){\line(4,-1){12}}
+   \put(6,2){\tiny$\labela$}\put(6,0.25){\tiny$\labelb$}\put
+     (6,-3){\tiny$\labelc$}    \fi % case 3
+}}
+%
+\def\leaf#1#2#3.{
+ \xcoord=\expandafter\number\csname nodex#3\endcsname
+ \ycoord=\expandafter\number\csname nodey#3\endcsname
+ \edef\coord{(\number\xcoord,\number\ycoord)}
+ \expandafter\put\coord{
+  \put(0,0){\circle*1}\put(0,1.5){\makebox(0,0){\scriptsize #1}}
+  \put(2,-0.6){\makebox(0,0)[l]{#2}}}}
+%
+%-------- end of trees.sty -------------


Property changes on: trunk/Master/texmf-dist/tex/latex/treesvr/trees.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-05-28 20:06:27 UTC (rev 71381)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-05-28 20:11:43 UTC (rev 71382)
@@ -873,7 +873,7 @@
     translation-filecontents-de translation-moreverb-de
     translation-natbib-fr translation-tabbing-fr
     translations translator transparent transparent-io
-    tree-dvips treetex trfsigns
+    tree-dvips treesvr treetex trfsigns
     trigonometry trimspaces trivfloat trivialpursuit trsym truncate truthtable
     tsemlines tsvtemplate
     tucv tuda-ci tudscr tufte-latex tugboat tugboat-plain

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2024-05-28 20:06:27 UTC (rev 71381)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2024-05-28 20:11:43 UTC (rev 71382)
@@ -1471,7 +1471,6 @@
  'translation-footmisc-de',     "die 'skipping, nocommercial'",
  'translation-pst-jtree-de',    "die 'skipping, nocommercial'",
  'translations',"&MAKEflatten",
- 'treesvr',     "die 'skipping, await request, 1995'",
  'trig',	"die 'skipping, core LaTeX'",
  'tuda-ci', 	"&MAKEflatten",
  'tugboat-toc', "die 'skipping, nonfree, CTAN enough'",

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2024-05-28 20:06:27 UTC (rev 71381)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2024-05-28 20:11:43 UTC (rev 71382)
@@ -1421,6 +1421,7 @@
 depend tramlines
 depend translations
 depend transparent
+depend treesvr
 depend trfsigns
 depend trimspaces
 depend trivfloat

Added: trunk/Master/tlpkg/tlpsrc/treesvr.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.