\documentclass[12pt, letterpaper]{article}
\usepackage{qtree}
\pagestyle{fancy}
\begin{document}
\paragraph{Question 6}
\Tree[.Ad [.\text{Sees Ad}
[.\text{Doesn't Try} ][.\text{Tries}
[.\text{Doesn't Become Regular} ] [.\text{Becomes Regular} ]
]][.\text{Doesn't See Ad}
[.\text{Doesn't Try} ][.\text{Tries}
[.\text{Doesn't Become Regular} ][.\text{Becomes Regular} ] ]]
]
\end{document}
您好,当我尝试绘制此树形图时,它会超出页面范围。我该如何解决此问题?
答案1
欢迎!我建议您改用,forest
因为forest
这样更容易避免不必要的空间(讽刺的是,这可以节省树木。;-)
\documentclass[12pt, letterpaper]{article}
\usepackage{fancyhdr}
\usepackage{forest}
\pagestyle{fancy}
\begin{document}
\paragraph{Question 6}
\begin{center}
\begin{forest}
for tree={align=center}
[Ad
[Sees Ad
[Doesn't Try]
[Tries
[Doesn't\\ Become\\ Regular]
[Becomes\\ Regular]
]
]
[Doesn't See Ad
[Doesn't Try]
[Tries
[Doesn't\\ Become\\ Regular]
[Becomes\\ Regular]
]
]
]
\end{forest}
\end{center}
\end{document}