I would like to have some paragraphs including a sequence of figures (no text at all). However I am not succeeding in placing the figures right below the paragraph title. What happens is that the paragraph title is shifted below the figures instead of remaining on top of those.

enter image description here

I know from this answer that I should not use a floating environment (such as the figure one) if I do not want my object to float in the document. However I need to organize my images in the same way I would do with the figure and subfigure environments. I have also tried using the H option, but it does not work. How can I achieve that?

Below a MWE for my case.

enter image description here


\usepackage{float}    % Images formatting
\usepackage{graphicx} % Insert figures


\caption{Illustration 1 of $N=16$}

| improve this question | | | | |
  • 1
    This is enough: newpage\paragraph{$\bm{N=16}$} \leavevmode \begin{figure}[H] ..... – Bernard Feb 10 '19 at 18:50
  • 1
    I've taken the liberty of editing your code to make it truly minimal -- no need to have 6 figure environments over 2 pages if a singe \paragraph statement and a single figure environment will do too, right? – Mico Feb 10 '19 at 19:02
  • 1
    @Bernard - You should post the \leavevmode suggestion as an answer -- and maybe provide an insight as to how and why \leavevmode "works" here? – Mico Feb 10 '19 at 19:04
  • @Mico thanks for the suggestion, indeed a single figure environment does the job for the problem I was facing. – fma Feb 10 '19 at 21:03

The figure or table envitonment require to be in horizontal mode. Immediately after a \paragraph or \subparagraph command, you're in vertical mode. The \leavevmode command ensures you're no more in vertical mode, and if you add it in your code, lie this:


it will work.

| improve this answer | | | | |
  • 1
    You wrote, "Immediately after a sectioning command, you're in vertical mode." This is a bit too broad -- the \paragraph and \subparagraph commands appear to require \leavevmode for the problem at hand, whereas \section, \subsection, and \subsubsection do not. – Mico Feb 11 '19 at 0:44
  • Do not use the [H] float positioning parameter. See [HEINOUS]{tex.stackexchange.com/questions/469880} – Peter Wilson Feb 11 '19 at 20:38
  • @PeterWilson: I know, but in the present case, I think it's inevitable considering the OP's requirements, so I respected his/her code. – Bernard Feb 11 '19 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.