我尝试按照一些线程来最小化我的图形下方的空白。这看起来很简单,但不起作用。也许我试图在附录环境中执行此操作?我想将我的图形从 16 厘米延长到 18 厘米(是的,页面上有足够的空间),我的尝试看起来像
\documentclass[a4paper, leqno, oneside] {report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lscape}
\usepackage{caption}
\usepackage{subfig}
\usepackage[section]{placeins}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{listings}
\usepackage{url}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{verbatim}
\usepackage{kbordermatrix}
\usepackage{graphicx}
\usepackage{listings}
\usepackage[table]{xcolor}
\usepackage[swedish, english]{babel}
\usepackage{hvfloat}
\usepackage{booktabs}
\usepackage[textwidth=15cm, textheight=23cm]{geometry}
\usepackage[nottoc]{tocbibind}
\usepackage[toc]{appendix}
\usepackage{rotating,caption,booktabs}
\begin{document}
\section*{Appendix 5}
\addcontentsline{toc}{section}{A.5 my figure}
\begin{figure}[h]
\centering
\caption{My very big picture}
\setlength{\belowcaptionskip}{-2cm}
\includegraphics[height=16cm, width=1 \linewidth]{QQmale1.png}
\label{fig:QQmale1}
\end{figure}
\end{document}
答案1
您应该减少页面上默认的文本份额。尝试添加\renewcommand{\textfraction}{0.05}
到文档序言中:
\documentclass[demo, % only for test purposes
a4paper, leqno, oneside] {report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lscape}
%\usepackage{caption} % loaded second time
\usepackage{subfig}
\usepackage[section]{placeins}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{listings}
\usepackage{url}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{verbatim}
\usepackage{kbordermatrix}
\usepackage{graphicx}
\usepackage{listings}
\usepackage[table]{xcolor}
\usepackage[swedish, english]{babel}
\usepackage{hvfloat}
%\usepackage{booktabs} % loaded second time
\usepackage[textwidth=15cm, textheight=23cm,
showframe % only for test purposes
]{geometry}
\usepackage[nottoc]{tocbibind}
\usepackage[toc]{appendix}
\usepackage{rotating,caption,booktabs}
\renewcommand{\textfraction}{0.05} % <---
\begin{document}
\section*{Appendix 5}
\addcontentsline{toc}{section}{A.5 my figure}
\begin{figure}[htb]
\centering
\caption{My very big picture}
\includegraphics[height=0.88\textheight]{example-image}
\label{fig:QQmale1}
\end{figure}
\end{document}