我一直尝试编写一个图形,使其位于示例和函数之后,但它要么一直位于页面顶部,要么位于示例上方,要么位于定义下方。有没有办法阻止这种情况发生,或者有其他可行的代码?
begin{defn}
A function $f:A \rightarrow B$ is \textbf{One-to-One} if there exists $c_{1},c_{2} \in A$ with $f(c_{1})=f(c_{2})$ such that $c_{1}=c_{2}$\cite{lecture}. Therefore for every element $x$ in A there is a unique element $f(x)$in B it maps to. \par
\end{defn}
\begin{exmp} [Equation $f(x)=x^{2}, A = \{ x \in \mathbb{R} | x \geq 0\} $]
\vfill
\afterpage{\FloatBarrier}
\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{one-to-one}
\end{figure}[h]
\vfill
\afterpage{\FloatBarrier}
\end{exmp}