TransWikia.com

includegraphics scale not working

TeX - LaTeX Asked by Micael Salomon on June 21, 2021

Im trying to change the size of the picture with “scale” but is not working

documentclass{report}

usepackage{graphicx}
usepackage[left=1.5cm,top=1cm,right=1.5cm,bottom=1cm]{geometry}
begin{document}
SweaveOpts{concordance=TRUE}


begin{figure}[htb]
begin{center}
includegraphics[scale=0.5]{D:/R/pdf/pruebas/caratula3.jpg}
end{center}
begin{center}
includegraphics[scale=1]{D:/R/pdf/pruebas/caratula3.jpg}
end{center}
end{figure} 

end{document}

This is the image.

This is the image

Thanks!

2 Answers

What do you mean it isn't working? What happens if you add an image with scale=1? Also, don't load graphics.

Consider the following:

documentclass{report}

usepackage{graphicx}
usepackage[left=1.5cm,top=1cm,right=1.5cm,bottom=1cm]{geometry}
begin{document}


begin{figure}[htb]
begin{center}
   includegraphics[scale=0.5]{example-image-a}
end{center}
begin{center}
    includegraphics[scale=1]{example-image-a}
end{center}
end{figure} 

end{document}

enter image description here

Correct answer by JPi on June 21, 2021

I was facing the same problem (images not scaling with includegraphics[scale=value]{image}).

In my case, I was unintentionally setting the default scaling values for the includegraphics command, as detailed here: Turning off default scaling options (setkeys{Gin}) temporarily

In my case, fixing the problem was as easy as removing the following line:

setkeys{Gin}{width=<value>}

I hope others find this answer useful!

Answered by guyik on June 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP