答案1
\documentclass{article}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
forked edges,
for tree={rounded corners,draw,fill=gray!20,font=\sffamily,
align=left,text width=8em,s sep+=1em}
[\textbf{Approach}
[{\textbf{location-based}\\[1.2em] blub}]
[{\textbf{inertia-based}\\[1.2em] blah}]
[{\textbf{hybrid}\\[1.2em] pft}]
]
\end{forest}
\end{document}
附录:当然,相同的代码也适用于投影仪演示(最多可以使一些距离稍微小一点)。
\documentclass{beamer}
\usepackage[edges]{forest}
\begin{document}
\begin{frame}[t]
\frametitle{A tree}
\centering
\begin{forest}
forked edges,
for tree={rounded corners,draw,fill=gray!20,font=\sffamily,
align=left,text width=7em,s sep+=0.5em}
[\textbf{Approach}
[{\textbf{location-based}\\[1.2em] blub}]
[{\textbf{inertia-based}\\[1.2em] blah}]
[{\textbf{hybrid}\\[1.2em] pft}]
]
\end{forest}
\end{frame}
\end{document}
答案2
以下内容可以作为起点:
\documentclass{beamer}
\usepackage[edges]{forest}
\begin{document}
\begin{frame}
\frametitle{example diagram}
\begin{forest}
for tree={
draw,
rounded corners,
node options={align=left,fill=gray!20},
text width=2.7cm,
},
[Approach,
[\textbf{location-based} \\ Some text,
]
[\textbf{inertial based} \\ some text,
]
[\textbf{Hybrid} \\some text,
]
]
\end{forest}
\end{frame}
\end{document}