Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a problem with a very large tree. What I woul like to do is moving the first node (1 NP) to the left to give more room for the others. The second node V_e1 dominating er could also go to the left. The Adj node could even go into the area of the Det node. Is this possible?

\documentclass{minimal}
\usepackage{graphicx,tikz-qtree}

\newcommand{\relliste}[1]{%
\mbox{%
$%
%
\left\langle \textrm{#1} \right\rangle%
$%
}%
}

\newcommand{\feattab}[1]{[\begin{tabular}[t]{@{}l@{}}#1 ]\end{tabular}}

\newcommand{\eliste}{%
\mbox{%
$\left\langle\right\rangle$}%
}


\begin{document}

\resizebox{\linewidth}{!}{%
\begin{tikzpicture}
\tikzset{level 1/.style={level distance=8\baselineskip}}%
\tikzset{level 2/.style={level distance=8\baselineskip}}%
\tikzset{level 3/.style={level distance=8\baselineskip}}%
\tikzset{level 4+/.style={level distance=6\baselineskip}}%
\tikzset{frontier/.style={distance from root=40\baselineskip}}%
\Tree[.{V$_{e1}$\feattab{
         SPR \relliste{ },\\
         COMPS \eliste\\
         RELS  \relliste{ h4:present(e1, h5), h5:eaqual\_rel(e1, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
         HCONS \relliste{ h7 $=_q$ h9 } }}
          [.{{1} NP\feattab{
                        RELS  \relliste{ },\\
                        HCONS \relliste{ } }}  han ]
          [.{V$_{e1}$\feattab{
              SPR \relliste{ {1} },\\
              COMPS \eliste\\
              RELS  \relliste{ h4:present(e1, h5), h5:equal\_rel(e, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
              HCONS \relliste{ h7 $=_q$ h9 } }}
              [.{V$_{e1}$\feattab{
                  SPR  \relliste{ {1} },\\
                  COMPS \relliste{ {2} },\\
                  RELS  \relliste{ h4:present(e1, h5) },\\
                  HCONS \eliste }} \edge node[auto=left]{Inflectional LR};
                [.{V$_e$\feattab{
                  SPR  \relliste{ {1} },\\
                  COMPS \relliste{ {2} },\\
                  RELS  \eliste,\\
                  HCONS \eliste }} er ] ]
              [.{{2} NP$_{e1}$\feattab{
                      head|subj \relliste{ {1} NP$_x$ },\\
                      SPR \eliste,\\
                      RELS  \relliste{ h5:equal\_rel(e1, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
                      HCONS \relliste{ h7 $=_q$ h9 } }}
                [.{NP$_y$\feattab{
                      SPR \eliste,\\
                      RELS  \relliste{ h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
                      HCONS \relliste{ h7 $=_q$ h9 } }}
                  [.{{3} Det\feattab{
                        RELS  \relliste{ h6:some(y, h7, h8) },\\
                        HCONS \relliste{ h7 $=_q$ h9 } }} en ]
                  [.{N$_y$\feattab{
                        SPR \relliste{ {3} }\\
                        RELS  \relliste{ h9:smart(e2, y), h9:man(y) },\\
                        HCONS \eliste }} 
                    [.{Adj\feattab{
                          RELS  \relliste{ h9:smart(e2, y) },\\
                          HCONS \eliste }} klog ]
                    [.{N$_y$\feattab{
                          RELS  \relliste{ h9:man(y) },\\
                          HCONS \eliste }} mand ] ] ]
              ]
          ]
]
\end{tikzpicture}}

\end{document}
share|improve this question

1 Answer 1

You can shift nodes in the tree by making each an explicit TikZ \node and specifying the minimum width for the node:

\documentclass{minimal}
\usepackage{graphicx,tikz-qtree}

\newcommand{\relliste}[1]{%
\mbox{%
$%
%
\left\langle \textrm{#1} \right\rangle%
$%
}%
}

\newcommand{\feattab}[1]{[\begin{tabular}[t]{@{}l@{}}#1 ]\end{tabular}}

\newcommand{\eliste}{%
\mbox{%
$\left\langle\right\rangle$}%
}


\begin{document}

\resizebox{\linewidth}{!}{%
\begin{tikzpicture}
\tikzset{level 1/.style={level distance=8\baselineskip}}%
\tikzset{level 2/.style={level distance=8\baselineskip}}%
\tikzset{level 3/.style={level distance=8\baselineskip}}%
\tikzset{level 4+/.style={level distance=6\baselineskip}}%
\tikzset{frontier/.style={distance from root=40\baselineskip}}%
\Tree[.{V$_{e1}$\feattab{
         SPR \relliste{ },\\
         COMPS \eliste\\
         RELS  \relliste{ h4:present(e1, h5), h5:eaqual\_rel(e1, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
         HCONS \relliste{ h7 $=_q$ h9 } }}
          [.\node[minimum width=4in] (NP1) {{1} NP\feattab{
                        RELS  \relliste{ },\\
                        HCONS \relliste{ } }};  han ]
          [.{V$_{e1}$\feattab{
              SPR \relliste{ {1} },\\
              COMPS \eliste\\
              RELS  \relliste{ h4:present(e1, h5), h5:equal\_rel(e, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
              HCONS \relliste{ h7 $=_q$ h9 } }}
              [.\node[minimum width=4in] (VP) {V$_{e1}$\feattab{
                  SPR  \relliste{ {1} },\\
                  COMPS \relliste{ {2} },\\
                  RELS  \relliste{ h4:present(e1, h5) },\\
                  HCONS \eliste }}; \edge node[auto=left]{Inflectional LR};
                [.{V$_e$\feattab{
                  SPR  \relliste{ {1} },\\
                  COMPS \relliste{ {2} },\\
                  RELS  \eliste,\\
                  HCONS \eliste }} er ] ]
              [.{{2} NP$_{e1}$\feattab{
                      head|subj \relliste{ {1} NP$_x$ },\\
                      SPR \eliste,\\
                      RELS  \relliste{ h5:equal\_rel(e1, x, y), h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
                      HCONS \relliste{ h7 $=_q$ h9 } }}
                [.{NP$_y$\feattab{
                      SPR \eliste,\\
                      RELS  \relliste{ h6:some(y, h7, h8), h9:smart(e2, y), h9:man(y) },\\
                      HCONS \relliste{ h7 $=_q$ h9 } }}
                  [.{{3} Det\feattab{
                        RELS  \relliste{ h6:some(y, h7, h8) },\\
                        HCONS \relliste{ h7 $=_q$ h9 } }} en ]
                  [.{N$_y$\feattab{
                        SPR \relliste{ {3} }\\
                        RELS  \relliste{ h9:smart(e2, y), h9:man(y) },\\
                        HCONS \eliste }} 
                    [.{Adj\feattab{
                          RELS  \relliste{ h9:smart(e2, y) },\\
                          HCONS \eliste }} klog ]
                    [.{N$_y$\feattab{
                          RELS  \relliste{ h9:man(y) },\\
                          HCONS \eliste }} mand ] ] ]
              ]
          ]
]
\end{tikzpicture}}

\end{document}

output of code

share|improve this answer
    
No, this adds space, I want to subtract space. For instance Adj should be typeset really close to the line connecting en and Det and han should be as much left as possible and close to er. The idea is to have the content as big as possible in order to make the stuff readable. –  Stefan Müller Oct 8 '12 at 6:55
    
@Stefan I guess I was misled by your wanting the NP1 node further to the left. You can try making the sibling distance negative, which will push the nodes together a bit. See Pushing siblings together in TikZ tree. –  Alan Munn Oct 8 '12 at 12:45
    
OK. Thanks. I now managed to shift the adjective node below the Det node. But what I want is a combination of the two things. I want to shift the NP node to the left as in your solution and then shift everything below the V nodes to the left as well. sibling distance seems to fail here. –  Stefan Müller Oct 9 '12 at 15:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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