![圖片不會轉到頁面的一半](https://rvso.com/image/328480/%E5%9C%96%E7%89%87%E4%B8%8D%E6%9C%83%E8%BD%89%E5%88%B0%E9%A0%81%E9%9D%A2%E7%9A%84%E4%B8%80%E5%8D%8A.png)
您好,我正在寫一篇論文,我的設置本質上是使用我的大學模板,其中有一個主 .tex 文件,然後訪問該文件\input{Chapter}
來製作每一章。
在我的章節中,一般格式是文本文本文本,末尾帶有數字每個圖都在單獨的頁面上,其標題位於下方,並且全部居中且位於頁面的中間。
我有一個比其他圖形更小的圖形,當我使用典型命令時,Latex 將其放在上一頁上前一個圖形下方(將其與標題和所有內容一起擠壓),因此為了避免這種情況,我使用了該\clearpage
命令,但現在圖形出現了居中但不在頁面中間。有任何想法嗎?
\topskip0pt
\vspace*{\fill}
\begin{figure}[h]
\centering
\includegraphics[width=.9\textwidth,height=.9\textheight,keepaspectratio]{Fig3.pdf}
\caption[Figure one caption for preamble]{Figure one caption on page it appears.}
%\label{fig:filenameoffigurehere}
\end{figure}
\vspace*{\fill}
\clearpage
\topskip0pt
\vspace*{\fill}
\begin{figure}[h]
\centering
\includegraphics[width=.9\textwidth,height=.9\textheight,keepaspectratio]{Fig4.pdf}
\caption[Figure 2 caption for preamble]{Figure 2 caption on page it appears.}
%\label{fig:filenameoffigurehere}
\end{figure}
\vspace*{\fill}
我的包裹清單(不斷變化)如下:
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{textcomp}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{color}
\usepackage{amsmath}
\usepackage{fixltx2e}
\usepackage[square,super,sort,comma,numbers]{natbib}
%\usepackage[]{chapterbib}
\usepackage{fancyvrb}
\usepackage{amstext}
\usepackage{units}
\usepackage{inputenc}
\usepackage{array}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{booktabs,makecell}
\renewcommand\theadfont{\bfseries}
\setcellgapes[b]{-3pt}
\newcommand{\mca}[1]{\multicolumn{2}{c}{#1}}
\newcommand{\mcb}[1]{\multicolumn{4}{c}{#1}}
\usepackage{siunitx}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
%\usepackage{multirow}
%\usepackage{float}
%\usepackage[T1]{fontenc}
%\usepackage[hidelinks]{hyperref}
\usepackage{parskip}
\usepackage{setspace}
\usepackage{float}
\floatstyle{plaintop}
\restylefloat{table}
答案1
看看這是否有幫助:
\documentclass{report}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[1-7]
\begin{figure}[p]% <---
\vspace*{\fill}
\centering
\includegraphics[width=.9\textwidth,height=.9\textheight,keepaspectratio]{example-image-a}
\caption[Figure one caption for preamble]{Figure one caption on page it appears.}
%\label{fig:filenameoffigurehere}
\vspace*{\fill}
\end{figure}
\clearpage% <---
\lipsum[1-5]
\begin{figure}[p]% <---
\vspace*{\fill}
\centering
\includegraphics[width=.9\textwidth,height=.9\textheight,keepaspectratio]{example-image-b}
\caption[Figure 2 caption for preamble]{Figure 2 caption on page it appears.}
%\label{fig:filenameoffigurehere}
\vspace*{\fill}
\end{figure}
\end{document}
我使用圖形選項p
並放在\clearpage
每個圖形之後。