\usepackage{amsmath}%数学包,一般有公式编辑就加这个,命令多。
\numberwithin{equation}{section}%必须有amsmath
\numberwithin{figure}{section}
\numberwithin{table}{section}
在XeLaTex的模式下的导言区,添加上述内容,然后直接交叉引用。
先添加好\label{name} 再使用 \ref{ } 来引用。
\begin{figure}[!h]
\centering
\includegraphics [scale=0.5]{7.png}
\caption{程序流程图}
\label{fig:7}
\end{figure}