summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/qobitree
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/qobitree')
-rw-r--r--Master/texmf-dist/doc/latex/qobitree/example.tex194
-rw-r--r--Master/texmf-dist/doc/latex/qobitree/readme92
2 files changed, 286 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/qobitree/example.tex b/Master/texmf-dist/doc/latex/qobitree/example.tex
new file mode 100644
index 00000000000..505749d7d2a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/qobitree/example.tex
@@ -0,0 +1,194 @@
+ %% Datum: 27.06.95
+ %% Datum: 22.06.95
+ %% Datum: 22.06.95
+ %% Datum: 22.06.95
+ %% Datum: 22.06.95
+\documentstyle{article}
+\newcommand{\define}{\stackrel{\triangle}{=}}
+\newcommand{\samelayer}{\bowtie}
+\newcommand{\Xbar}{$\overline{\rm X}$}
+\newcommand{\Xspec}{$\mbox{\rm X}_{\mbox{\scriptsize\rm SPEC}}$}
+\newcommand{\Ibar}{$\overline{\rm I}$}
+\newcommand{\Ispec}{$\mbox{\rm I}_{\mbox{\scriptsize\rm SPEC}}$}
+\newcommand{\Nspec}{$\mbox{\rm N}_{\mbox{\scriptsize\rm SPEC}}$}
+\newcommand{\Vspec}{$\mbox{\rm V}_{\mbox{\scriptsize\rm SPEC}}$}
+\newcommand{\Sbar}{$\overline{\rm S}$}
+\newcommand{\CAUSE}{\mbox{\rm CAUSE}}
+\newcommand{\GO}{\mbox{\rm GO}}
+\newcommand{\BE}{\mbox{\rm BE}}
+\newcommand{\ORIENT}{\mbox{\rm ORIENT}}
+\newcommand{\PATH}[1]{\left[_{\mbox{\scriptsize\rm Path}}\;#1\right]}
+\newcommand{\FROM}{\mbox{\rm FROM}}
+\newcommand{\TO}{\mbox{\rm TO}}
+\newcommand{\TOWARD}{\mbox{\rm TOWARD}}
+\newcommand{\UPWARD}{\mbox{\rm UPWARD}}
+\newcommand{\AT}{\mbox{\rm AT}}
+\newcommand{\IN}{\mbox{\rm IN}}
+\newcommand{\OUT}{\mbox{\rm OUT}}
+\newcommand{\ON}{\mbox{\rm ON}}
+\newcommand{\WALK}{\mbox{\rm WALK}}
+\newcommand{\RUN}{\mbox{\rm RUN}}
+\newcommand{\SEE}{\mbox{\rm SEE}}
+\newcommand{\FLEE}{\mbox{\rm FLEE}}
+\newcommand{\SLIDE}{\mbox{\rm SLIDE}}
+\newcommand{\JOHN}{\mbox{\bf John}}
+\newcommand{\MARY}{\mbox{\bf Mary}}
+\newcommand{\BILL}{\mbox{\bf Bill}}
+\newcommand{\BETH}{\mbox{\bf Beth}}
+\newcommand{\TARO}{\mbox{\bf Taro}}
+\newcommand{\MAN}{\mbox{\bf man}}
+\newcommand{\PERSONA}{\mbox{\bf person}_1}
+\newcommand{\PERSONB}{\mbox{\bf person}_2}
+\newcommand{\PERSONC}{\mbox{\bf person}_3}
+\newcommand{\OBJECTA}{\mbox{\bf object}_1}
+\newcommand{\DOG}{\mbox{\bf dog}}
+\newcommand{\CAT}{\mbox{\bf cat}}
+\newcommand{\CUP}{\mbox{\bf cup}}
+\newcommand{\BOOK}{\mbox{\bf book}}
+\newcommand{\TABLE}{\mbox{\bf table}}
+\newcommand{\CORNER}{\mbox{\bf corner}}
+\newcommand{\SCHOOL}{\mbox{\bf school}}
+\newcommand{\ROOM}{\mbox{\bf room}}
+\newcommand{\WINDOW}{\mbox{\bf window}}
+\newcommand{\BALL}{\mbox{\bf ball}}
+\newcommand{\PUSH}{\mbox{\rm PUSH}}
+\newcommand{\FALL}{\mbox{\rm FALL}}
+\newcommand{\OUTSIDE}{\mbox{\bf outside}}
+\newcommand{\AGENT}{\mbox{\sc Agent}}
+\newcommand{\PATIENT}{\mbox{\sc Patient}}
+\newcommand{\THEME}{\mbox{\sc Theme}}
+\newcommand{\SOURCE}{\mbox{\sc Source}}
+\newcommand{\GOAL}{\mbox{\sc Goal}}
+\input{qobitree}
+\setlength{\topmargin}{0in}
+\setlength{\oddsidemargin}{0.25in}
+\setlength{\evensidemargin}{0in}
+\setlength{\textwidth}{6.25in}
+\setlength{\textheight}{8.15in}
+\begin{document}
+\begin{center}
+\leaf{{\em John}\\$\JOHN$}
+\leaf{{\em slid}\\$\CAUSE(x,\GO(y,\PATH{u,v}))$}
+\leaf{{\em the}\\$\bot$}
+\leaf{{\em cup}\\$\CUP$}
+\branch{2}{{\em the cup}\\$\CUP$}
+\leaf{{\em from}\\$\FROM(x)$}
+\leaf{{\em Mary}\\$\MARY$}
+\branch{2}{{\em from Mary}\\$\FROM(\MARY)$}
+\leaf{{\em to}\\$\TO(x)$}
+\leaf{{\em Bill}\\$\BILL$}
+\branch{2}{{\em to Bill}\\$\TO(\BILL)$}
+\branch{4}{{\em slid the cup from Mary to Bill}\\
+$\CAUSE(x,\GO(\CUP,\PATH{\FROM(\MARY),\TO(\MARY)}))$}
+\faketreewidth{{\em slid the cup from Mary to Bill}\\
+$\CAUSE(x,\GO(\CUP,\PATH{\FROM(\MARY),\TO(\MARY)}))$}
+\branch{2}{{\em John slid the cup from Mary to Bill.}\\
+$\CAUSE(\JOHN,\GO(\CUP,\PATH{\FROM(\MARY),\TO(\MARY)}))$}
+\tree
+\end{center}
+\newpage
+\begin{center}
+\begin{tabular}{ccccc}
+\leaf{\fbox{x}}\branch{1}{\Xbar}\tree &
+\leaf{\Xspec}\leaf{\fbox{\Xbar}}\branch{2}{XP}\tree &
+\leaf{\fbox{\Xbar}}\leaf{\Xspec}\branch{2}{XP}\tree &
+\leaf{\fbox{\Xbar}}\leaf{Y}\branch{2}{\Xbar}\tree &
+\leaf{Y}\leaf{\fbox{\Xbar}}\branch{2}{\Xbar}\tree\\
+\ & & & & \\
+(a) & (b) & (c) & (d) & (e)
+\end{tabular}
+\end{center}
+\newpage
+\begin{center}
+\begin{tabular}{ccccc}
+\leaf{$\phi$}\branch{1}{$\phi$}\tree &
+\leaf{\fbox{$\phi(x)$}}\leaf{$\psi$}\branch{2}{$\phi(\psi)$}\tree &
+\leaf{$\psi$}\leaf{\fbox{$\phi(x)$}}\branch{2}{$\phi(\psi)$}\tree &
+\leaf{\fbox{$\phi$}}\leaf{$\bot$}\branch{2}{$\phi$}\tree &
+\leaf{$\bot$}\leaf{\fbox{$\phi$}}\branch{2}{$\phi$}\tree\\
+\ & & & & \\
+(i) & (ii) & (iii) & (iv) & (v)
+\end{tabular}
+\end{center}
+\newpage
+\begin{center}
+\leaf{{\em The}\\$\bot$\\\Nspec}
+\leaf{{\em cup}\\$\CUP$\\N}
+\branch{2}{\fbox{Fracture}}
+\branch{1}{{\em The cup}\\$\CUP$\\NP}
+\leaf{$\;\;\;\vdots\;\;\;$}
+\leaf{$\;\;\;\vdots\;\;\;$}
+\branch{2}{\fbox{Fracture}}
+\branch{1}{{\em slid from John to Mary}\\
+{$\GO(x,\PATH{\FROM(\JOHN),\TO(\MARY)})$}\\
+IP}
+\branch{2}{\fbox{Fracture}}
+\branch{1}{{\em The cup slid from John to Mary.}\\
+$\GO(\CUP,\PATH{\FROM(\JOHN),\TO(\MARY)})$\\
+IP}
+\tree
+\end{center}
+\newpage
+\leaf{ACT}
+\leaf{THING\\{[(Bob)]}}
+\leaf{THING\\{[(box)]}}
+\leaf{MANNER\\``throwing''}
+\leaf{GO}
+\leaf{THING\\(box)}
+\leaf{TO}
+\leaf{THING\\(Bill)}
+\branch{2}{PATH\\{[ ]}}
+\faketreewidth{PATH\\{[ ]}}
+\branch{3}{effect\\EVENT}
+\faketreewidth{effect\\EVENT}
+\branch{5}{EVENT}
+\begin{center}
+\begin{tabular}{l}
+throw:\\
+\tree
+\end{tabular}
+\end{center}
+\newpage
+\begin{center}
+\leaf{{\em The}}
+\branch{1}{$\mbox{\rm D}^{0}$}
+\leaf{{\em cup}}
+\branch{1}{$\mbox{\rm N}^{2}$}
+\branch{2}{$\mbox{\rm D}^{1}$}
+\branch{1}{$\mbox{\rm D}^{2}_{1}$}
+\leaf{{\em slide}}
+\branch{1}{$\mbox{\rm V}^{0}_{2}$}
+\leaf{{\em -ed}}
+\branch{1}{$\mbox{\rm I}^{0}$}
+\branch{2}{$\mbox{\rm I}^{0}$}
+\leaf{{\em t}}
+\branch{1}{$\mbox{\rm D}^{2}_{1}$}
+\leaf{{\em t}}
+\branch{1}{$\mbox{\rm V}^{0}_{2}$}
+\branch{1}{$\mbox{\rm V}^{1}$}
+\branch{2}{$\mbox{\rm V}^{2}$}
+\leaf{{\em from}}
+\branch{1}{$\mbox{\rm P}^{0}$}
+\leaf{{\em John}}
+\branch{1}{$\mbox{\rm D}^{2}$}
+\branch{2}{$\mbox{\rm P}^{1}$}
+\branch{1}{$\mbox{\rm P}^{2}$}
+\branch{2}{$\mbox{\rm V}^{2}$}
+\leaf{{\em to}}
+\branch{1}{$\mbox{\rm P}^{0}$}
+\leaf{{\em Mary}}
+\branch{1}{$\mbox{\rm D}^{2}$}
+\branch{2}{$\mbox{\rm P}^{1}$}
+\branch{1}{$\mbox{\rm P}^{2}$}
+\branch{2}{$\mbox{\rm V}^{2}$}
+\faketreewidth{\hspace*{30mm}}
+\branch{2}{$\mbox{\rm I}^{1}$}
+\branch{2}{$\mbox{\rm I}^{2}$}
+\faketreewidth{\hspace*{40mm}}
+\leaf{$\emptyset$}
+\branch{1}{$\mbox{\rm C}^{0}$}
+\branch{2}{$\mbox{\rm C}^{1}$}
+\branch{1}{$\mbox{\rm C}^{2}$}
+\tree
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/qobitree/readme b/Master/texmf-dist/doc/latex/qobitree/readme
new file mode 100644
index 00000000000..f96298c1458
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/qobitree/readme
@@ -0,0 +1,92 @@
+While writing my PhD thesis, I put together some useful LaTeX macros for
+typesetting trees. I thought that they would be of general interest so I am
+making them available. I gave an earlier version of these macros to Phil
+Resnik a few months ago. These new macros are much easier to use and produce
+much nicer output. For arcane reasons, the new macros, however, use a
+different calling sequence. To use the new package get the file
+~qobi/tex/QobiTree/QobiTree.tex from unagi and put in wherever you put your TeX
+macros. Put the line:
+
+\input{QobiTree}
+
+somewhere at the beginning of your LaTeX file. The tree macros operate like a
+stack machine. You push TeX boxes onto the stack containing text for the nodes
+of the tree and then you pop them off the make branching nodes which get
+pushed back on the stack. The following commands are supported:
+
+\leaf{<text>}
+
+Pushes a node onto the stack containing <text>. The <text> can contain
+`\\' commands to create a node with more than one line. For example:
+
+\leaf{NP\\{\em John}}
+
+creates a two line node with NP (in roman) on top of John (in italics).
+You can put any TeX box inside a leaf node, including math mode, LaTeX
+picture environments, tables, embedded postscript, and other trees.
+QobiTree automatically figures out how big the node is and sizes the tree and
+its branches accordingly.
+
+The command:
+
+\branch{n}{<text>}
+
+pops n nodes off the stack and creates a branching node with n children and
+pushes it back on the stack. The first node popped off becomes the rightmost
+child and the last node popped off becomes the leftmost child. n must be an
+integer between 1 and 5. (It is possible to extend QobiTree to handle trees of
+greater branching factor. See me if you need to.) The branching node created
+is given <text> as its label. Again <text> can have `\\' commands and can be
+any TeX box. For example:
+
+\leaf{NP\\{\em John}}
+\leaf{V\\{\em saw}}
+\leaf{NP\\{\em Mary}}
+\branch{2}{VP\\{em saw Mary}}
+\branch{2}{S\\{\em John saw Mary}}
+
+creates a simple binary branching tree.
+
+The \leaf and \branch command don't generate any typeset output. They just
+push trees onto the stack. The output is generated with the following command:
+
+\tree
+
+which pops one node off the stack and typesets it as a single box. Usually you
+would center this box as in:
+
+\leaf{NP\\{\em John}}
+\leaf{V\\{\em saw}}
+\leaf{NP\\{\em Mary}}
+\branch{2}{VP\\{em saw Mary}}
+\branch{2}{S\\{\em John saw Mary}}
+\begin{center}
+\tree
+\end{center}
+
+but it is also possible to put a tree in a sentence, in a table, in a math
+mode formula, in a picture environment, or in another tree.
+The file ~qobi/tex/QobiTree/examples.tex contains some examples taken
+from my thesis.
+
+Most of the time, QobiTree does a good job of figuring out how to space the
+children of a tree. It never mistakingly overlaps children. Unlike the earlier
+version of the tree macros I gave Phil, it is usually able to space the tree
+better without inordinate growth in deep trees. Sometimes however, you can
+give it some help to produce even better looking output. The command:
+
+\faketreewidth{<text>}
+
+tells QobiTree to override its default calculation of the width of the node on
+the top of the stack and replace it with the width of <text> (which again can
+have `\\' commands etc.) <text> is not actually typeset but is used just to
+compute the fake width of the node on the top of the stack. When you use
+\faketreewidth you are on your own. This can either shrink or enlarge the
+space taken by the node and may result in trees with overlapping children.
+Usually a few tries with xdvi and you can adjust the tree widths to produce
+the desired output. See ~qobi/tex/QobiTree/examples.tex for some
+examples using \faketreewidth.
+
+I hope that people find these macros useful. Feel free to pass them on to
+whoever wants them.
+ Jeff