0

I am trying to insert an image in my document using one of the relative scales, such as \columnwidth or \textwidth. When I use one of them, the image disappears, but the label is present on the text: Figure disappears

\begin{figure*}[htbp]
\centerline{\includegraphics[scale=\columnwidth]{LaTeX/images/test-image.png}}
\caption{This is a test image.}
\label{ux1}
\end{figure*}

However, if I set the scale to a number, such as 0.30:

enter image description here

\begin{figure*}[htbp]
\centerline{\includegraphics[scale=0.30]{LaTeX/images/test-image.png}}
\caption{This is a test image.}
\label{ux1}
\end{figure*}

The same happens when I use the figure environment (without the *) for a single-column image. Since this is a template, I am not sure if I am allowed to change the document's structure.

Any ideas?

  • 1
    (i) replace \centerline{....} with \centering (ii) scale=<number> not scale=\textwidth, (iii) image width can be set by width=<width>. Please, provide an MWE with your image, that we can more easy answer/show you a solution. – Zarko Mar 4 at 14:00
  • 1
    \columnwidth is a length and not suitable for the scale key, use width=\columnwidth. – Ulrike Fischer Mar 4 at 15:54

Your Answer

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

Browse other questions tagged or ask your own question.