0

I am using overleaf.com to write a document.I am using EUSFLAT 2019 template following is code which I inserted in this

\begin{figure}[!htbp]
    \centering
    \includegraphics[width=60mm,height=40mm]{images/gcp_security_model1.jpg}
    \caption\label{ GCP Anomaly Detection}
    \end{figure}

this is how it looks like
image of document
I want the image inserted to come before 5 Footnotes and Citations in the figure above. The code of image is before Footnotes and citations section i.e.

\section{Footnotes and Citations} follows after the code of the image above. I am not able to understand why is the image coming at the wrong location. The original image is very large in size.

David Carlisle
  • 757,742
  • figure environments are floats that can move away from where tey were entered in the code. Since your figure does not fit into the page it gets shifted to the next page. In order to avoid the bottom of the previous page to be empty, the text that was originally after the figure now starts at the previous page. – leandriis Mar 14 '20 at 16:32
  • 1
    Unrelated to the issue, but you will also have to fix \caption\label{ GCP Anomaly Detection} to something like \caption{GCP Anomaly Detection}\label{myfigure}. – leandriis Mar 14 '20 at 16:35
  • ok as mentioned in this answer https://tex.stackexchange.com/a/282/208541 to use placeins package, how do I use package in overleaf I mean in which file should I put this or how to install package in overleaf template which I am using – koeradoera Mar 14 '20 at 16:36
  • Place \usepackage[section]{placeins} in the preamble of your .tex file (Between \documentclass... and \begin{document}). – leandriis Mar 14 '20 at 16:38
  • 1
    you don't really need any package, just put \clearpage before \section{Footnotes and citations} but presumably the image you show is not generated by the code you posted as \caption\label must give errors rather than the output that you show doesn't it? – David Carlisle Mar 14 '20 at 16:40
  • there are a lot of errors in my document which I see in log file section on overleaf. I am new to this environment. So I am not able to understand what to post and ask.Which section should I ask and like posting error corresponding to it I am not able to understand. – koeradoera Mar 14 '20 at 16:44
  • 2
    if you get any error then do not even look at the generated pdf output or the positions of floats. TeX makes no attempt to make sensible output after an error, the output is, at best, just of possible use in debugging. Certainly fix all errors before adding forced page breaks to adjust float positions. – David Carlisle Mar 14 '20 at 16:47
  • 1
    start with the first error (later errors are often spurious generated by recovery from earlier errors) and try to fix that. If you can not fix it, ask a question about that error, – David Carlisle Mar 14 '20 at 16:48
  • ok just for information this is the image I am using https://cloud.google.com/solutions/images/partners/for-12.png how can I give reference to a URL in overleaf to mention from where I used the image. – koeradoera Mar 14 '20 at 16:58
  • that is unrelated to your question here but just say in teh caption or main text something like "copied from \url{https://cloud.google.com/solutions/images/partners/for-12.png} " The \url command is defined in hyperref or url packages – David Carlisle Mar 14 '20 at 17:39

0 Answers0