减少 Tikz-QTree 的大小

减少 Tikz-QTree 的大小

我的屏幕上只显示了下面这棵树的一半,但有大量空白。有什么方法可以减少空白并更改某些行的长度以使其完全适合?谢谢!

\documentclass[12pt, letterpaper]{article}
\usepackage{fullpage}

\usepackage[margin=1in]{geometry}

\usepackage{tikz}
\usepackage{tikz-qtree}
\usetikzlibrary{shapes.geometric}

\begin{document}

Paragraph paragraph paragraph

\Tree [.Proto-Siouan [.Western [.MissouriValley Crow Hidatsa ] [.*Mandan ] [.OhioValley *Tutelo [ *Ofo *Biloxi ] ] [.MississippiValley [.Dakotan [.Nakota Stoney Assiniboine ] [.``Sioux" Lakhota [ Dakota Nakota ] ] ] [ [.Winnebago-Chiwere [.Hocank ] [.Chiwere [.*Iowa ] [.*Oto ] ] ] [.Dhegiha *Kansa-Osage [ *Quapaw Omaha-Ponca ] ] ] ] ] [.Eastern *Catawba *Woccon ] ]

Paragraph paragraph paragraph

\end{document}

答案1

因为向下生长会使您的树太宽。尝试使其向右生长,减小字体大小,并将长名称拆分为两行:

\documentclass[12pt, letterpaper]{article}
\usepackage{fullpage}
\usepackage{tikz-qtree}
\usetikzlibrary{shapes.geometric}

\begin{document}

Paragraph paragraph paragraph
\begin{center}
    \begin{tikzpicture}
\tikzset{grow=right,level distance=24mm}
\tikzset{every tree node/.style={align=left, font=\footnotesize, anchor=west}}

\Tree 
[.Proto--\\Siouan 
    [.Western 
        [.Missouri-\\Valley Crow Hidatsa ] 
        [.*Mandan ] 
        [.OhioValley *Tutelo 
            [ *Ofo *Biloxi ] 
        ] 
        [.Mississippi-\\Valley 
            [.Dakotan 
                [.Nakota Stoney Assiniboine ] 
                [.``Sioux" Lakhota 
                    [ Dakota Nakota ] 
                ] 
            ] 
            [ 
                [.Winnebago--\\Chiwere 
                    [.Hocank ] 
                    [.Chiwere 
                        [.*Iowa ] 
                        [.*Oto ] 
                    ] 
                ] 
                [.Dhegiha *Kansa--\\Osage 
                    [ *Quapaw Omaha--\\Ponca ] 
                ] 
            ] 
        ] 
    ] 
    [.Eastern *Catawba *Woccon ] 
]
    \end{tikzpicture}
\end{center}
Paragraph paragraph paragraph

\end{document}

在此处输入图片描述

(红线表示文本边框)

答案2

在此处输入图片描述

\documentclass[border=10pt,tikz]{standalone} 
\usepackage[edges]{forest} 
\usetikzlibrary{fit} 
\usetikzlibrary{shadows.blur}
\begin{document} 
    \begin{forest} 
        for tree={
                    grow'=0, 
                    align=center,
                    draw, 
%                   fill=white, 
%                   blur shadow,
                    forked edges,
        },
        [.Proto-Siouan [
        .Western [
        .MissouriValley Crow Hidatsa ] 
        [.*Mandan ] 
        [.OhioValley *Tutelo [ 
        *Ofo *Biloxi ] ] 
        [.MississippiValley [
        .Dakotan [
        .Nakota Stoney Assiniboine ] 
        [.``Sioux" Lakhota [ 
        Dakota Nakota ] ] ] 
        [ [.Winnebago-Chiwere [
        .Hocank ] 
        [.Chiwere [
        .*Iowa ] 
        [.*Oto ] ] ] 
        [.Dhegiha *Kansa-Osage [ 
        *Quapaw Omaha-Ponca ] ] ] ] ] 
        [.Eastern *Catawba *Woccon ] ]
    \end{forest}
\end{document}

相关内容