1

I have been reading Heim & Kratzer 1998, and I find that the pattern of compositional analysis interesting. The tree drawing is difficult, for it need to insert two trees in a line and each tree requires brackets, as follows:

enter image description here

I really wonder how to draw a compositional analysis like this, and I have been trying for the whole week but it just didn't work. Thank you for reading this question~

3
  • 1
    Welcome to TeX.SE! What you try so far?
    – Zarko
    Nov 12, 2022 at 3:59
  • 1
    Close voters, while the question doesn't have any code, it's quite clear and now has two answers. There's no reason to close it.
    – Alan Munn
    Nov 12, 2022 at 16:34
  • Almost all question of "do-this-instead-of-me" type are quite clear: (i) problem is (more or less) evident, (ii) asker do not show any effort to solve her/his problem. At such question I (usual) saw request to be closed as Needs details or clarity. But here, as I see, OP wrote own answer (what is very fine) and show that actually doesn't need any help ...
    – Zarko
    Nov 12, 2022 at 17:38

3 Answers 3

3

There's no real need to use the adjustbox package to do this, you can simply wrap the trees in a tikzpicture environment and set the baseline appropriately. In terms of amount of typing, though it's six of one, half a dozen of the other.

\documentclass{article}
\usepackage{tikz-qtree}
\usepackage{adjustbox}
\usepackage{stmaryrd}
\tikzset{aligned/.style={baseline=(current bounding box.center)}}
\begin{document}

\[
\left\llbracket 
  \begin{tikzpicture}[aligned]
  \Tree [.VP [.V' [.V is ] [.AP brown ]]]
  \end{tikzpicture}
 \right\rrbracket 
    \left (
        \left \llbracket
    \begin{tikzpicture}[aligned] 
             \Tree[.NP [.D the ] [.N' [.N handbag ]]]
    \end{tikzpicture} 
        \right \rrbracket 
    \right )
\]

\end{document}

output of code

3

Thanks to Žarko, I can draw the process of compositional analysis like the Heim & Kratzer 1998, and here is an example.

%    LuaLaTeX & XeLaTeX
\documentclass{article}
\usepackage{tikz-qtree}
\usepackage{adjustbox}
\usepackage{stmaryrd}

\begin{document}

\[
\left\llbracket \adjustbox{valign=m}{
  \Tree [.VP [.V' [.V is ] [.AP brown ]]]
}
 \right\rrbracket 
    \left (
        \left \llbracket 
            \adjustbox{valign=m}{ \Tree[.NP [.D the ] [.N' [.N handbag ]]] }
        \right \rrbracket 
    \right )
\]

\end{document}

enter image description here

1
  • 1
    My name is Zarko (in my native language/alphabet is written as Žarko) :-)
    – Zarko
    Nov 12, 2022 at 17:32
2

As starting point ...

By use unicode-math, forest and adjustbox packages. Compiled with LuaLateX:

%    LuaLateX
\documentclass[varwidth, margin=3mm]{standalone}
\usepackage{unicode-math}
\usepackage{forest}
\usepackage{adjustbox}

\begin{document}
\[
\left\lBrack\adjustbox{valign=m}{
\begin{forest} 
    [VP, 
        [likes]
        [all]
    ]
\end{forest}}
\right\rBrack = [\lambda\in D, \dots]
\]

\[
\left\lBrack\adjustbox{valign=m}{
\begin{forest}
    [S,
        [Ann]
        [VP,
            [likes]
            [all]
        ]
    ]
\end{forest}}
\right\rBrack
    = \left\lBrack\adjustbox{valign=m}{
        \begin{forest} % =center
        [VP,
            [likes]
            [all]
        ] = [\lambda x\in D, ...]
           \end{forest}r}
      \right\rBrack
\]
\end{document}

enter image description here

3
  • Thank you so much!! All methods I found to put trees in brackets is based on tikz package, but they are a bit complex for me. This is the first time I use adjustbox package, and I found it extremely efficient and elegant.
    – Shear1902
    Nov 12, 2022 at 16:11
  • By the way, I compiled with LauLaTeX first, but it didn't work out. So I tried to compile it with XeLaTeX and all is perfect. I also use stmaryrd package to make growing delimiters and tikz-qtree package to draw trees, for I am more familiar to them, and luckily all is compatible. Thank you again for saving my Semantics essay~
    – Shear1902
    Nov 12, 2022 at 16:17
  • @Shear1902, instead saying "thankyou" you may consider to upvote my answer :-). And for sure it works with LuaLatex (as well with XeLaTeX).
    – Zarko
    Nov 12, 2022 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .