Latex--force image position

1. Commonly used floating format options [htbp]:

  • 『h』Current location. Place the graphic in the body text where the context for the graphic is given. If there are not enough pages left on this page, this parameter will have no effect.
  • 『t』top. Place the graphic at the top of the page.
  • 『b』bottom. Place the graphic at the bottom of the page.
  • "p" floating page. Place the graphic on a page that allows floating objects.

2. Some experience in using

  • Generally, a combination like [htb] is used, and just using [h] is useless. This combination means that latex will try its best to satisfy the floating format listed first, which is the order h-t-b, so that the typesetting effect is as good as possible.
  • 『!h』 just tries to place it at the current position. If the rest of the page doesn't fit, it will still go to the next page. In general, when using the [!h] option, there will often be problems with incorrect placement, so [ht], [htbp], etc. are commonly used.
  • If you really need to place the image at the current position without changing it, you can use the [H] option of the float macro package. However, if you do this, you will need to manually adjust it if problems arise. The usage format is as follows:
    \usepackage{float}

    3. Use examples

\begin{figure}[h]
    \centering
    \includegraphics[width=0.8\textwidth]{figure/Figure.png}
    \label{fig:my_label}
\end{figure}

View contentxmjdh's visitor.

Guess you like

Origin blog.csdn.net/kaixinjiaoluo/article/details/127754696