0

I have been writing in an overleaf document where it worked fine to place my figures. When I copy-pasted some content into a different template, all figures and tables got placed at the end regardless of placement specifier. It may be that some new usepackage in the new template is causing this.

Furthermore, my figures have the form

\begin{figure}[H]
\centering
\includegraphics[angle=0, width=0.6\linewidth]{fig9.png}
\caption{text}
\label{fig.9}
\end{figure} 

The Jhep template does not have many usepackages:

\documentclass[a4paper,11pt]{article}
\pdfoutput=1
\usepackage[utf8]{inputenc}
\usepackage{uniinput}
\usepackage{jheppubnew}
\usepackage{bm}

\begin{document}

I have also tried [hbt!] but no command seems to work.

I scanned these packages but did not find any reason my figure get places at the end?

Trying the usepackages

\usepackage{subfig}
\usepackage{caption}

did not make change the placement.

Does anyone have more experience and know what the problem could be?

David Carlisle
  • 757,742
  • 2
    if you use [H] then either the figure will not move at all or you will get an error about an unknown float type. In the latter case use the float package to define it. If you get any error the PDF is not intended to be usable, – David Carlisle Aug 22 '21 at 09:38
  • 1
    note that if you use [hbt] and have large figures that take up more than 75% of the page then you are forcing all the figures to the end of the document as the main effect of [hbt] is to prevent p ie it disallows a page just consisting of figures. – David Carlisle Aug 22 '21 at 09:42
  • Thank you very much. Using the float userpackage worked! – Johan Hansen Aug 22 '21 at 10:23
  • 1
    Never ignore errors! – David Carlisle Aug 22 '21 at 10:28
  • Also, if one figure has to wait until the next \clearpage, all the ones after it will also have to wait. – John Kormylo Aug 22 '21 at 14:54

0 Answers0