1

I'm writing a report using the IFAC style, but when making some sections and putting some images inside in the following way:

 \section{Section 1}

    \subsection{Subsection 1}

    One thing and other
   \begin{figure}[H]
   \begin{center}
   \includegraphics[width=8.4cm]{file1.png} 
   \caption{caption } 
   \label{fig:LM741}
   \end{center}
   \end{figure}


\subsection{Subsection 2} 

after compiling it to PDF, instead of the images inside each subsection, it gets the list of sections/subsection and the whole bunch of images at the end. How to correct this?

P.S.: I have tried using sections and subsection.

naphaneal
  • 2,614
riccs_0x
  • 1,087
  • 2
    have you defined the H float type? in latex prior to 2015 using H would take all figures to the end. with more recent latex it will give an error. – David Carlisle Oct 28 '17 at 20:34
  • 2
    Try h! instead of H (see above comment) – aidangallagher4 Oct 28 '17 at 20:35
  • 1
    @DavidCarlisle I did not define the type, in fact I do not know about the issue, hope you can point a article or web to get more info. – riccs_0x Oct 28 '17 at 20:44
  • 1
    @aidangallagher4 Trying now... – riccs_0x Oct 28 '17 at 20:44
  • 3
    H is provided by the float package. (but if your latex is older than 2015 you should probably update your tex system) – David Carlisle Oct 28 '17 at 20:45
  • 1
    Ok! That solve the problem, thanks, but I would to like more about this details. – riccs_0x Oct 28 '17 at 20:46
  • 3
    @aidangallagher4 [htp] is a lot better than [h] (omitting p makes it far more likely that the figure goes to end of document) – David Carlisle Oct 28 '17 at 20:46
  • 1
    @DavidCarlisle, not it is not, Im using Version 3.14159265 (TeX Live 2017/TeX Live for SUSE Linux) – riccs_0x Oct 28 '17 at 20:46
  • 2
    @riccs_0x somewhere you must have seen some documentation or example using H (as it is not mentioned in any of the official latex documentation) that documentation must have mentioned the float package that defines that option. – David Carlisle Oct 28 '17 at 20:47
  • 2
    @DavidCarlisle doesnt the exclamation mark override all the other parameters anyway? I suppose if there OP wanted some flexability about where it ended up then htp is better though fair enough – aidangallagher4 Oct 28 '17 at 20:48
  • 1
    @DavidCarlisle Perhaps read it a long time a go, so its better to say that perhaps I forgot that, But im looking for [htp] right now – riccs_0x Oct 28 '17 at 20:49
  • 3
    In that case you should have got an error: `\documentclass{article}

    \begin{document} \begin{figure}[H]

    \end{figure} \end{document}makes! LaTeX Error: Unknown float option `H'.`

    – David Carlisle Oct 28 '17 at 20:49
  • 4
    @aidangallagher4 no. [!h] means not top not bottom and not float page, normally latex issues a warning and changes it to !ht to give itself a chance but it still means not bottom and not float page – David Carlisle Oct 28 '17 at 20:51

0 Answers0