这个乳胶代码跨越两页,但我想把它放在一页上。
\documentclass[a4paper]{scrbook}
\usepackage[right = 12mm, left=12mm, top=0.5in, bottom=5in]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[section]{placeins}
\begin{document}
\begin{equation}
y = ac + b
\end{equation}
\begin{equation}
y = mc + c
\end{equation}
\section{text}
\begin{figure}[h]
\centering
\includegraphics[width=10cm,height=5cm]{ONE.jpg}
\caption{}
\end{figure}
\section{text}
\begin{figure}[h]
\centering
\includegraphics[width=10cm,height=5cm]{TWO.jpg}
\caption{}
\end{figure}
\end{document}
答案1
您指定的区域根本放不下这种尺寸的图片。我把它们缩小了,它们就适合了。
\documentclass[a4paper]{scrbook}
\usepackage[right = 12mm, left=12mm, top=0.5in, bottom=5in]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
%\usepackage[section]{placeins}
\begin{document}
\begin{gather}
y = ac + b\\
y = mc + c
\end{gather}
\section{text}
\begin{figure}[!htbp]
\centering
\includegraphics[width=10cm,height=3.7cm]{example-image-a}
\caption{}
\end{figure}
\section{text}
\begin{figure}[!htbp]
\centering
\includegraphics[width=10cm,height=3.7cm]{example-image-b}
\caption{}
\end{figure}
\end{document}
答案2
如果有人遇到此问题,您也可以更改
\usepackage[right = 12mm, left=12mm, top=0.5in, bottom=5in]{geometry}
到
\usepackage[right = 12mm, left=12mm, top=0.5in]{geometry}
移除
bottom=5in
这将为你提供更多页面空间来添加内容