
Não consigo encaixar esta enorme coleção de árvores em uma página sem que o número da página seja obscurecido. Alguém pode me ajudar?
\documentclass[12pt,a4paper]{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\usepackage{ulem}
\begin{document}
\begin{tikzpicture}
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture}
\rotatebox{90}{\begin{tikzpicture}[baseline=(current bounding box.center), scale= 0.9]
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture} {\Huge$\Rightarrow$}
\begin{tikzpicture} [baseline=(current bounding box.center), scale=.45]
\Tree [.{\formula{\exists y [woman' (y) \land [\forall x [man' (x) \rightarrow hug'(y, x)]]: (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \exists y [woman' (y) \land Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists y [woman' (y) \land Q(x)] : (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\forall x [man' (x) \rightarrow saw'(j, x)] : t_{1} }} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall (x) [P(x) \rightarrow Q(x)]: (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m): (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (me) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m): (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y): (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (le) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le)..controls +(south west:5) and +(south:5) .. (ue);
\draw[semithick, dashed, ->] (me)..controls +(south west:7) and +(south:7) .. (ne);
\begin{scope}[xshift=-0.5cm,yshift=-10cm]
\Tree [.{\formula{\forall x [man' (x) \rightarrow[\exists y [woman' (y) \rightarrow hug'(y, x)]]: (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall x [P(x) \rightarrow Q(x)] : (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\exists x [woman' (y) \land saw'(j, y)] : t_{1} }} [.{\formula{\lambda Q. \exists (y) [woman'(y) \land Q(y)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists (y) [P(y) \land Q(y)]: (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m): (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (le) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m): (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y): (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (me) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le)..controls +(south west:2) and +(south:2) .. (ue);
\draw[semithick, dashed, ->] (me)..controls +(south west:7) and +(south:7) .. (ne);
\end{scope}
\end{tikzpicture} }
\end{document}
Responder1
Bem, você poderia fazer isso, mas seus leitores não vão agradecer por isso! Seria melhor repensar a forma como você está apresentando as informações (ou imprimir em A3).
\documentclass[12pt,a4paper]{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\newcommand\formula[1]{\ensuremath{#1}}
\usepackage{ulem}
\begin{document}
\begin{tikzpicture}
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture}
\rotatebox{90}{%
\resizebox{\textheight}{!}{%
\begin{tikzpicture}[baseline=(current bounding box.center)]
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture} {\Huge$\Rightarrow$}
\begin{tikzpicture} [baseline=(current bounding box.center), scale=.5]
\Tree [.{\formula{\exists y [woman' (y) \land [\forall x [man' (x) \rightarrow hug'(y, x)]]: (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \exists y [woman' (y) \land Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists y [woman' (y) \land Q(x)] : (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\forall x [man' (x) \rightarrow saw'(j, x)] : t_{1} }} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall (x) [P(x) \rightarrow Q(x)]: (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m): (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (me) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m): (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y): (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (le) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le)..controls +(south west:5) and +(south:5) .. (ue);
\draw[semithick, dashed, ->] (me)..controls +(south west:7) and +(south:7) .. (ne);
\begin{scope}[xshift=-0.5cm,yshift=-10cm]
\Tree [.{\formula{\forall x [man' (x) \rightarrow[\exists y [woman' (y) \rightarrow hug'(y, x)]]: (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall x [P(x) \rightarrow Q(x)] : (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\exists x [woman' (y) \land saw'(j, y)] : t_{1} }} [.{\formula{\lambda Q. \exists (y) [woman'(y) \land Q(y)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists (y) [P(y) \land Q(y)]: (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m): (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (le) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m): (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y): (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (me) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le)..controls +(south west:2) and +(south:2) .. (ue);
\draw[semithick, dashed, ->] (me)..controls +(south west:7) and +(south:7) .. (ne);
\end{scope}
\end{tikzpicture}}}
\end{document}
Se você quiser a primeira árvore na mesma página, você pode tentar isso, mas, novamente, seus leitores não acharão fácil:
\documentclass[12pt,a4paper]{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\newcommand\formula[1]{\ensuremath{#1}}
\usepackage{ulem}
\begin{document}
\rotatebox{90}{%
\begin{minipage}{\textheight}
\begin{tikzpicture}
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture}
\resizebox{\textheight}{!}{%
\begin{tikzpicture}[baseline=(current bounding box.center)]
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture} {\Huge$\Rightarrow$}
\begin{tikzpicture} [baseline=(current bounding box.center), scale=.5]
\Tree [.{\formula{\exists y [woman' (y) \land [\forall x [man' (x) \rightarrow hug'(y, x)]]: (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \exists y [woman' (y) \land Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists y [woman' (y) \land Q(x)] : (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\forall x [man' (x) \rightarrow saw'(j, x)] : t_{1} }} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall (x) [P(x) \rightarrow Q(x)]: (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m): (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (me) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m): (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y): (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (le) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le)..controls +(south west:5) and +(south:5) .. (ue);
\draw[semithick, dashed, ->] (me)..controls +(south west:7) and +(south:7) .. (ne);
\begin{scope}[xshift=-0.5cm,yshift=-10cm]
\Tree [.{\formula{\forall x [man' (x) \rightarrow[\exists y [woman' (y) \rightarrow hug'(y, x)]]: (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall x [P(x) \rightarrow Q(x)] : (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\exists x [woman' (y) \land saw'(j, y)] : t_{1} }} [.{\formula{\lambda Q. \exists (y) [woman'(y) \land Q(y)]: (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists (y) [P(y) \land Q(y)]: (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man: \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m): (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (le) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m): (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y): (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (me) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le)..controls +(south west:2) and +(south:2) .. (ue);
\draw[semithick, dashed, ->] (me)..controls +(south west:7) and +(south:7) .. (ne);
\end{scope}
\end{tikzpicture}}
\end{minipage}}
\end{document}
Adicione \centering
se \minipage
quiser que as árvores sejam centralizadas:
Presumo que a escala diferente tenha algum significado, por isso mantive a escala relativa constante dentro da caixa girada. No entanto, os resultados obviamente parecem um pouco estranhos....
Responder2
Concordo com o cfr que você pode querer repensar a quantidade de informações que está colocando em uma página, principalmente se você realmente precisa da árvore no topo, que é duplicada antes da seta.
Aqui estão as alterações que fiz para economizar espaço. Eles são todos independentes um do outro, então você pode ajustá-los para atender às suas necessidades, mas acho que você descobrirá que a quebra de linha faz a maior diferença.
- Quebra de linha nos nós da árvore.Em suas árvores semânticas, quebrei as linhas nos dois pontos. Para permitir a quebra de linha nos nós, você precisará do arquivo
every tree node/.style={align=center,anchor=north}
. Também ajusteilevel distance
para evitar que os galhos ficassem muito planos ou invertidos depois que as linhas fossem quebradas. - Margens.Reduzi todas as margens para 2,5 cm usando a
geometry
embalagem. - Dimensionamento.Eu usei
\scalebox
um comando fornecido porgraphicx
, que é carregado portikz
. Descobri que funciona melhor que ascale
opção emtikz
.
\documentclass[12pt,a4paper]{article}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\newcommand\formula[1]{\ensuremath{#1}}
\usepackage{ulem}
\usepackage[margin=2.5cm]{geometry}
\begin{document}
\scalebox{.7}{
\begin{tikzpicture}
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture}
}
\rotatebox{90}{%
\scalebox{.6}{
\begin{tikzpicture}[baseline=(current bounding box.center)]
\Tree [.S [.DP [.D some ] [.N woman ] ] [.VP [.V hugs ] [.DP [.D every ] [.N man ] ]]]
\end{tikzpicture} {\Huge$\Rightarrow$}
}
\scalebox{.6}{
\begin{tikzpicture} [baseline=(current bounding box.center), every tree node/.style={align=center,anchor=north}, level distance = 9ex]
\Tree [.{\formula{\exists y [woman' (y) \land [\forall x [man' (x) \rightarrow hug'(y, x)]]:}\\\formula{(t} \hspace{0.1cm}} [.{\formula{\lambda Q. \exists y [woman' (y) \land Q(x)]:}\\ \formula{(\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists y [woman' (y) \land Q(x)] :}\\ \formula{(e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$:\\ \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):}\\\formula{(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\forall x [man' (x) \rightarrow saw'(j, x)] :}\\\formula{t_{1} }} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]:}\\ \formula{(\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall (x) [P(x) \rightarrow Q(x)]:}\\\formula{(e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man:\\ \formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):}\\\formula{(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m):}\\\formula{(t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (me) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m):}\\\formula{ (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y):}\\\formula{ (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (le) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le.south west)..controls +(south west:4) and +(south:5) .. (ue);
\draw[semithick, dashed, ->] (me.south west)..controls +(-10,-3) and +(south:7) .. (ne);
\begin{scope}[xshift=-0.5cm,yshift=-12cm]
\Tree [.{\formula{\forall x [man' (x) \rightarrow[\exists y [woman' (y) \rightarrow hug'(y, x)]]:}\\\formula{ (t} \hspace{0.1cm}} [.{\formula{\lambda Q. \forall x [man' (x) \rightarrow Q(x)]:}\\\formula{ (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \forall x [P(x) \rightarrow Q(x)] :}\\\formula{ (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda z. woman(z)$:\\\formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):}\\\formula{(e_{3} \rightarrow t_{1})} } [. \node (ne) {e$_{2}$}; ] [.{\formula{\exists x [woman' (y) \land saw'(j, y)] :}\\\formula{ t_{1} }} [.{\formula{\lambda Q. \exists (y) [woman'(y) \land Q(y)]:}\\\formula{ (\forall X(e_{3} \rightarrow X) \rightarrow X))} \hspace{0.1cm}} [. { \formula{\lambda P. \lambda Q. \exists (y) [P(y) \land Q(y)]:}\\\formula{ (e_{4} \rightarrow t_{1})\rightarrow (\forall X(e_{3} \rightarrow X) \rightarrow X))}} ] [.{$\lambda$ x. x is a man:\\\formula{(e_{4} \rightarrow t_{1})}} ] ] [.{\formula{\lambda m. saw(k,m):}\\\formula{(e_{3} \rightarrow t_{1})} } [. \node (ue) {e$_{3}$}; ] [.{\formula{saw(k,m):}\\\formula{ (t_{1}) \hspace{0.1cm} }} [.\node [circle,draw] (le) {k : e$_{2}$} ;] [.{\formula{\lambda x. saw(x,m):}\\\formula{ (e_{2} \rightarrow t_{1}) \hspace{0.1cm} }} [. {\formula{\lambda y\lambda x. saw(x,y):}\\\formula{ (e_{3} \rightarrow (e_{2} \rightarrow t_{1})} } ] [. \node [circle,draw] (me) {m : e$_{3}$} ; ] ] ] ] ] ] ] ] ]
\draw[semithick, dashed, ->] (le.west)..controls +(west:1) and +(south:1) .. (ue);
\draw[semithick, dashed, ->] (me.south west)..controls +(-12,-3) and +(south:8) .. (ne);
\end{scope}
\end{tikzpicture}}}
\end{document}