1

I have met a simple problem. Why my figures do not exhbit in the same section?

The code is,

\section{Figures}
\begin{figure}[!h]
        \centering
        \includegraphics[width=7in]{gr}
        \caption{IR}
\end{figure}
\begin{figure}[!h]
    \includegraphics[width=7in]{jd}
    \caption{Cyc}
\end{figure}

But they turn up in different sections.

closed as unclear what you're asking by user36296, Mensch, Mike, esdd, Andrew Swann Nov 19 '17 at 15:21

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    [!h] makes it highly likely that all figures go to the end of the document as it specifies the figures can not be placed at the top or bottom of a page or on a page on their own (latex usually warns and changes it to ht) use [htp] and put \clearpage before the next section – David Carlisle Jun 21 '17 at 14:18
  • 1
    Even using [htp] you would need to add a \clearpage at the end of the section to prevent them from winding up in the next section. – John Kormylo Jun 21 '17 at 14:27
  • And I also want to adjust my figures to be best fit so that each page can fill as many figures as possible. Is there any way to solve it? – Carl Jun 22 '17 at 1:19
  • 1
    You could increase \topnumber (2) and \bottomnumber (1) to fit more floats on the page. You could also increase \topfraction (.7) and \bottomfraction (.3). See tex.stackexchange.com/questions/39017/… – John Kormylo Jun 22 '17 at 14:09

Browse other questions tagged or ask your own question.