以下代码
\documentclass[UTF8]{beamer}
\usepackage{mathtools}
\usepackage{tikz}
\renewcommand{\mathfamilydefault}{cmss}
\usetikzlibrary{shapes,arrows}
\tikzstyle{ordin} = [rectangle, draw, text width=5em, text centered, rounded corners]
\tikzstyle{line} = [draw,-latex']
\begin{document}
\begin{frame}
\begin{center}
\begin{tikzpicture}[node distance = 2cm, auto]
\node[ordin,fill=green!20] (parameq) {Parametric Equation};
\node[ordin,right of=parameq,node distance=7cm] (tanv) {Tangent Vector};
\node[ordin,below of=parameq,node distance=3cm] (point) {Point};
\node[ordin,below of=tanv,node distance=3cm] (TVP) {TV for the Point};
\path[line](parameq)--node{differentiate}(tanv);
\path[line](parameq)--(point);
\path[line](tanv)--(TVP);
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
答案1
欢迎!您可以使用matrix
。
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix,quotes}
\begin{document}
\begin{frame}[t,fragile]
\frametitle{A matrix}
\begin{tikzpicture}
\matrix[matrix of nodes,
nodes={rectangle, draw, text width=5em, text centered,anchor=center,
rounded corners},
column sep=2em,row sep=2em] (mat){
|[fill=green!20]| Parametric Equation & & Tangent Vector \\
& {Parameter\\ Value} & \\
Point & & TV for the Point\\
& |[text width=7em]| Tangent Line Normal Plane & \\
};
\draw[-latex] (mat-1-1) edge["differentiate"] (mat-1-3)
(mat-1-1) edge (mat-3-1) (mat-1-3) edge (mat-3-3)
(mat-2-2) edge["Subst"'] (mat-2-2-|mat-1-1)
(mat-2-2) edge["Subst"] (mat-2-2-|mat-1-3)
(mat-3-3.south) -- ++ (0,-1em) -| coordinate[pos=0.25] (aux) (mat-3-1)
(aux) -- (mat-4-2);
\end{tikzpicture}
\end{frame}
\end{document}
请注意,\tikzstyle
已被弃用。