0

This latex code spans across two pages but I want to have it on one page.

\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}

A picture of the images on two pages

2 Answers2

1

There simply is not room to fit images of that size in to the area you have specified. I made them smaller and they fit.

enter image description here

\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}
David Carlisle
  • 757,742
  • Thanks David for showing that the container of figure must be able to fit onto the page too, if it doesn't then the image moves onto the next page. – Gioan Nguyen Nov 13 '16 at 22:11
1

If any one comes across this problem, you can also change the

\usepackage[right = 12mm, left=12mm, top=0.5in, bottom=5in]{geometry}

to

\usepackage[right = 12mm, left=12mm, top=0.5in]{geometry}

removing

bottom=5in

this will give you more space on the page to add stuff