
該乳膠代碼跨越兩頁,但我想將其放在一頁上。
\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
這將為您在頁面上提供更多空間來添加內容