例如,第一页是全是文字,我在文字后面插入了一个图表,并在图表后面添加了文字,一旦使用\newpage
或\clearpage
,就会出现下面的问题:
\newpage
:该命令无效\clearpage
:该命令可以拆分页面,但图表会放在下一页的中心,而添加的内容会放在另一页
我只想将图表放在页面顶部。我应该怎么做?
代码示例:
% !TEX program=pdflatex
\documentclass[12pt,a4paper]{article}
\usepackage{tabularray}
\usepackage[fontsize=24.88pt]{fontsize}
\begin{document}
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
There are some nonsenses below.Please IGNORE
\begin{table}[t!]
\centering
\begin{tblr}{|c|c|c|c|}
\hline
a & b & c & d\\
\hline
1 & 2 & 3 & 4\\
\hline
\end{tblr}
\end{table}
\clearpage
hahahaha
\end{document}