5

I want to reproduce something called the tower notation:

Example of tower notation

I have found out that I can make the tables like this:

\begin{array}{c|c}
S & S\\ 
S & S\\ \hline
\multicolumn{2}{c}{DP\bs S}\\
\end{array}

But I'm having trouble stacking these items, and then with wrapping everything in parentheses that grow with the content.

How do I do that?

3

I built stacking components and then combined them.

\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\def\bs{\textbackslash}
\def\Sm{S\textsuperscript{$-$}}
\tabcolsep 2pt
\begin{document}
\savestack\blockA{
\begin{tabular}{l|l}
S & \Sm\\ 
\hline
\Sm & \Sm\\ \hline
\multicolumn{2}{c}{DP}\\
\end{tabular}
}

\savestack\blockB{
\begin{tabular}{c}
$\forall x.[\,]x$\\
\hline
$[\,]$\\
\hline
$x$
\end{tabular}
}

\savestack\blockC{
\begin{tabular}{l|c}
\Sm & \Sm\\ 
\hline
\Sm & \Sm\\ \hline
\multicolumn{2}{c}{((DP\bs S)/DP)/DP}\\
\end{tabular}
}

\savestack\blockD{
\begin{tabular}{c}
$[\,]$\\
\hline
$[\,]$\\
\hline
\textbf{gave}
\end{tabular}
}

\savestack\blockE{
\begin{tabular}{l|l}
\Sm & \Sm\\ 
\hline
\Sm & S\\ \hline
\multicolumn{2}{c}{DP}\\
\end{tabular}
}

\savestack\blockF{
\begin{tabular}{c}
$[\,]$\\
\hline
$\exists y.[\,]$\\
\hline
$y$
\end{tabular}
}

\savestack\blockG{
\begin{tabular}{l|l}
\Sm & \Sm\\ 
\hline
S & S\\ \hline
\multicolumn{2}{c}{DP}\\
\end{tabular}
}

\savestack\blockH{
\begin{tabular}{c}
$\forall z.[\,]$\\
\hline
$[\,]$\\
\hline
$z$
\end{tabular}
}

\[
\vcenter{\hbox{\Shortstack{\blockA\\no one\\\blockB}}}
\left(\left(
\vcenter{\hbox{\Shortstack{\blockC\\gave\\\blockD}}}
\vcenter{\hbox{\Shortstack{\blockE\\anyone\\\blockF}}}
\right)
\vcenter{\hbox{\Shortstack{\blockG\\everything\\\blockH}}}
\right)
\]
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.