答案1
所显示图像的使用上下文并不完全清楚,因此请查看下面的图像是否是您想要的。
制作它的 MWE 是:
\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
calc, chains,
positioning}
\begin{document}
\begin{tikzpicture}[
node distance = 7mm and 0mm,
start chain = going right,
inner sep=1pt
]
\foreach \i [count=\j] in {5,x,x,x}
\node (n\j) [on chain] {$\i$};
\node (n0) [above = of $(n1)!0.5!(n4)$] {$5x^3$};
\foreach \i in {1,2,3,4}
\draw[-{Straight Barb[scale=0.8]}] (n0) -- (n\i);
\end{tikzpicture}
\end{document}
编辑:
或者使用forest
包将其绘制为树:
\documentclass[border=3.141592]{standalone}
\usepackage{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
for tree = {
inner sep = 1pt,
math content,
edge = -{Straight Barb[scale=0.8]},
l sep=11pt,
s sep=1pt,
}
[5x^3 [5][x][x][x]]
\end{forest}
\end{document}
答案2
一个简单的代码 pstricks
:
\documentclass{article}
\usepackage{pst-node, multido}
\begin{document}
\[ \begin{array}{c}
\rnode{C}{5x^3} \\ \\
\rnode{F0}{5}\, \Rnode{F1}{x}\, \Rnode{F2}{x}\, \Rnode{F3}{x}
\end{array}
\psset{nodesep=2pt, linewidth=0.5pt, arrowinset=0.2, linejoin=1}
\multido{\i =0+1}{4}{\ncline{->}{C}{F\i}} \]%
\end{document}