我用乳胶写作。我是新手,需要一些帮助。
我需要添加数字。我可以用下面的代码来完成
\begin{figure}[h]
\includegraphics[width = 15cm]{figures/mlpStrSingle}
\caption{MLP neural network for one single output node}
\label{fig:mlp}
\end{figure}
如果我使用它,该图将转到下一页。我需要在文本之后立即使用它。那么下一个文本应该开始。我怎样才能做到这一点?
提前致谢。
几种可能性:
最好的方法是拥抱为图像找到的乳胶位置,而不是对抗它。乳胶非常适合确定漂浮物的最佳位置。如果图像飘走了,这通常意味着它确实应该放置在其他地方,例如,如果您放置它的位置没有足够的空间。您的图像也非常宽 - 15 厘米比大多数标准类别的可用文本宽度宽,因此很难找到适合它的位置。
第二个最好的:尝试浮动包中的选项
[H]
是否可以强制你想要的位置。这如果您根本不希望图像浮动,请不要使用浮动。
\documentclass{article}
\usepackage{graphicx}
\usepackage{float}
\usepackage{caption}
\usepackage{lipsum}
\begin{document}
\section{Embrace the decision of latex}
\lipsum[2]
\begin{figure}[htbp]
\includegraphics[width=3cm]{example-image-duck}
\caption{MLP neural network for one single output node}
\label{fig:mlp}
\end{figure}
\lipsum[2]
\section{Insist on the position}
\lipsum[2]
\begin{figure}[H]
\includegraphics[width=3cm,page=2]{example-image-duck}
\caption{MLP neural network for one single output node}
\label{fig:mlpa}
\end{figure}
\lipsum[2]
\section{Don't use a float}
\lipsum[2]
%\begin{figure}[htbp]
\includegraphics[width=3cm,page=3]{example-image-duck}
\captionof{figure}{MLP neural network for one single output node}
% \label{fig:mlp}
%\end{figure}
\lipsum[2]
\end{document}
如果有人仍在搜索这个问题
\begin{figure}[hbt!]
\centering
\includegraphics[width=8cm]{image}
\caption{caption here}
\label{fig:vue-snoc-pos}
\end{figure}
\FloatBarrier
您可以使用换行符强制图像;
\\~\\
\includegraphics[width=0.33\linewidth]{t.png}
\includegraphics[width=0.33\linewidth]{sint(2).png}
\includegraphics[width=0.33\linewidth]{sint+t.png}
\\~\\