0

I want to place images after each other, without allowing any text to be placed in free space. I have 2 appendices in IEEEtran two column format. Both appendices have only figures. Appendix B should start after all figures in Appendix A are placed. But Appendix B text gets placed before that.

\appendices
\section{Examples of Emails in Gmail's Spam folder}
Below are screenshots of various types of warning messages shown by Gmail for different types of emails we found in Gmail's spam folder.

\begin{figure}[h!]
\centering
\includegraphics[width=\columnwidth]{imgs/gmail_spam/spam_spam}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=\columnwidth]{imgs/gmail_spam/spam_phishing}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=\columnwidth]{imgs/gmail_spam/spam_steal2}
\end{figure}

\section{Examples of Phishing Emails}
Below are some examples.

\begin{figure}[h!]
\centering
\includegraphics[width=\columnwidth]{imgs/phish_email/email1_neu}
\caption{Example 1}
\label{fig:email1}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=\columnwidth]{imgs/phish_email/email2_neu}
\caption{Example 2}
\label{fig:email2}
\end{figure}

In Appendix A, there is no space remaining for the second figure, so the second figure goes to the next page. But in the space that is remaining, the text of Appendix B gets written. How to avoid this?

  • A possible reason for this may be that after putting the first figure of Appendix A there is not enough space left on the page to put the second figure, and that's why the text from Appendix B appears. Try changing the dimension of the figures. – Nash J. Sep 21 '17 at 18:44
  • @NashJ. Yes, in Appendix A, there is no space remaining for the second figure, so the second figure goes to the next page. But in the space that is remaining, the text of Appendix B gets written. How to avoid this? – user5155835 Sep 22 '17 at 02:32
  • 3
    Don't use figures. Just include the graphics. You're not gaining anything by letting them float here, as far as I can see. Use the center environment, so you get appropriate spacing. – cfr Sep 22 '17 at 03:30
  • See https://tex.stackexchange.com/questions/375068/ or similar questions. – Dr. Manuel Kuehner Sep 22 '17 at 05:51
  • @cfr That solved the problem! Please can you write it as an answer with some code so that I can mark it. Also please can you tell when to use figure and when to use just includegraphics? – user5155835 Sep 22 '17 at 06:15
  • 2
    Use a figure environment if you want LaTeX to decide where the pictures should be placed. – Johannes_B Sep 22 '17 at 06:42
  • @user5155835: To avoid the appearance of text from Appendix B in the remaining space, you may use \clearpage. – Nash J. Sep 22 '17 at 13:09
  • @Johannes_B Can we find a duplicate? What do you think? – cfr Sep 23 '17 at 02:08

0 Answers0