LaTeX图表位置操作
1. 代码及说明
固定表格的位置:
\usepackage{float}
\restylefloat{table}
\begin{table}
...
\end{table}
固定图片的位置:
\usepackage{float}
\restylefloat{figure}
\begin{figure}
...
\end{figure}
其他:
\usepackage{placeins}
\FloatBarrier
\begin{table}[H]
\begin{tabular}{llll}
....
\end{tabular}
\end{table}
\FloatBarrier
\begin{table}[!htbp]
!-忽略“美学”标准
h-here
t-top
b-bottom
p-page-of-its-own
- h Place the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot)
- t Position at the top of the page.
- b Position at the bottom of the page.
- p Put on a special page for floats only.
- ! Override internal parameters LaTeX uses for determining “good” float positions.
- H Places the float at precisely the location in the LATEX code. Requires the float package. This is somewhat equivalent to h!.