
No puedo colocar esta enorme colección de árboles en una página sin que el número de página quede oculto. ¿Alguien puede ayudarme?
\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}
Respuesta1
Bueno, ¡podrías hacer esto pero tus lectores no te lo agradecerán! Sería mejor repensar cómo presenta la información (o imprimir en 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}
Si quieres el primer árbol en la misma página, puedes intentar esto pero, nuevamente, a tus lectores no les resultará 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}
Agregue \centering
si \minipage
desea que los árboles estén centrados:
Supongo que la escala diferente tiene algún significado, por lo que mantuve constante la escala relativa dentro del cuadro rotado. Sin embargo, los resultados obviamente parecen un poco extraños...
Respuesta2
Estoy de acuerdo con cfr en que es posible que desees reconsiderar cuánta información estás poniendo en una página, particularmente si realmente necesitas el árbol en la parte superior que luego se duplica antes de la flecha.
Estos son los cambios que hice para ahorrar espacio. Todos son independientes entre sí, por lo que puede modificarlos para satisfacer sus necesidades, pero creo que encontrará que el salto de línea marca la mayor diferencia.
- Salto de línea dentro de los nodos del árbol.En sus árboles semánticos, rompí las líneas en los dos puntos. Para permitir el salto de línea dentro de los nodos, necesitará
every tree node/.style={align=center,anchor=north}
. También ajusté ellevel distance
para evitar que las ramas se aplanaran demasiado o se invirtieran una vez que se rompieran las líneas. - Márgenes.Reduje todos los márgenes a 2,5 cm usando el
geometry
paquete. - Escalada.Utilicé
\scalebox
un comando proporcionado porgraphicx
, que se carga mediantetikz
. Descubrí que funciona mejor que lascale
opción entikz
.
\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}