0

This is the image I am trying to insert:

Image to insert

This is the relevant code used to insert it into my .tex file with \documentclass{article}. Previous line:

where \textit{tooffsets[i + 1]} depends on \textit{toffsets[i]}.

and then the code to insert the image:

\begin{figure}[H]
\includegraphics[width=\textwidth]{Graphics/cpu.PNG}
\caption{Visualizing sequential CPU algorithm}
\end{figure}

I am using \usepackage{float} to enable [H].

But it is not being rendered properly in the PDF:

misaligned document

In that the image is pushed to the right, appears above the text which comes before it in the code and there is no caption.

The other places where I have inserted images similarly, do not have alignment issues.

Related questions:

epR8GaYuh
  • 2,432
  • 3
    Could you give a bit more context? Because if I just enter the code you give here, it formats as you want it to format, so there is something else going wrong. – cktai Feb 21 '20 at 20:45
  • With provided information is not possible to reproduce your problem. Your code is just fine. My test: `\documentclass{article} \usepackage[demo]{graphicx}

    %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------%

    \begin{document}
    

    \begin{figure}[ht] \includegraphics[width=\textwidth]{Graphics/cpu.PNG} \caption{Visualizing sequential CPU algorithm} \end{figure}
    \end{document} `

    – Zarko Feb 22 '20 at 13:53
  • 2
    Most of the time, this sort of problem has to do with white space in the image itself. Try \fbox{\includegraphics{...}} and see how big is really is. – John Kormylo Feb 22 '20 at 16:24

0 Answers0