0
\section{Results}
In the figures attached in \textbf{Section 0.6} and in this section, two options are show that can be accessed by the user.


\begin{figure}[!h]
\centering
\includegraphics[width=0.75\textwidth]{bookin2.jpg}
\caption{A User entering Specific Data to book a room.}
\end{figure}
\begin{figure}[!h]
\centering
\includegraphics[width=0.75\textwidth]{data.jpg}
\caption{User can view his data, if he commands the system.}
\end{figure}

It has made it much simpler for the user, to simultaneously access his previous booking details, and make a new booking for further use.

I am trying to put these both pictures vertically in one section, but only the first picture is being placed there. the second one is being placed at the end of document after two sections. i am writing a report. Any help with it?

David Carlisle
  • 757,742
  • Welcome! Quite likely the second picture is too tall. Try to shrink its height, e.g. with \includegraphics[width=0.75\textwidth,height=0.5\textheight]{data.jpg}. –  Nov 30 '19 at 18:09
  • Sir, is it possible to take it to the next page? – user1234556 Nov 30 '19 at 18:10
  • These are floats. It will be on the next page unless it is too large. –  Nov 30 '19 at 18:11
  • \begin{figure}[!h] is more or less a request to move the figure to the end of the document. The figure environment is just to specify the figure can be moved, but [h] means it can not be placed at the top or the bottom of a page (not t or b) nor on a page on it sown (no p) so it doesn't have many chances. – David Carlisle Nov 30 '19 at 18:11
  • @Schrödinger'scat it worked! Thankyou! – user1234556 Nov 30 '19 at 18:20

1 Answers1

0

use

\begin{figure}[H]
...
\end{figure}

with the package

\usepackage{float}
Espoir
  • 110
  • 2
    this will almost certainly make very ugly white space in the document. – David Carlisle Nov 30 '19 at 18:12
  • I added. It helped. Thankyou! – user1234556 Nov 30 '19 at 18:21
  • you're welcome and good luck – Espoir Nov 30 '19 at 18:22
  • @Espoir: The code you show in your answer will place the figure in the output exactly where it was used in the code. If a given figure will not fit onto a page it will be moved to the next page and the remeining space on the bottom of the previous page will be left blank. Depending on the size and placement of your figures this will give you quite large and therefore ugly wite spaces. – leandriis Nov 30 '19 at 18:22
  • @leandriis I usually use this code and I never have got the white space, thank you very much for your explain, please could you tell me a solution ? – Espoir Nov 30 '19 at 18:25
  • @Espoir: \documentclass{article} \usepackage{graphicx} \usepackage{float} \usepackage{lipsum} \begin{document} \lipsum[1-3] \begin{figure}[H] \includegraphics[width=10cm]{example-image} \end{figure} \lipsum \end{document} would be a minimal example to produce such a white space at the bottom of page 1. To overcome this, use the floating mechanism of latex instead of disabeling it. Float placement can be controlled using the optional argument of figure with a combination of h, t, b and p. For more info see here: https://tex.stackexchange.com/q/2275/134144 – leandriis Nov 30 '19 at 18:31
  • @leandriis thank you very much for your awesome explain – Espoir Nov 30 '19 at 18:48
  • Please see https://tex.stackexchange.com/questions/469880 Is float placement [H] considered heinous?. – Peter Wilson Nov 30 '19 at 19:13