TransWikia.com

Unexpected figure rotation

TeX - LaTeX Asked on April 13, 2021

I have some images embebed in pdf file.
Same formula/coding but some image rotated auto (wrong) and some image are correct. Image file: jpg.

My minimal coding:

    documentclass{article}
usepackage[a4paper,landscape,left=0.5cm,right=5.0cm,top=0.5cm,bottom=0.5cm]{geometry}
usepackage{subfigure}
usepackage{wrapfig,floatrow}
usepackage{caption} 
usepackage{tikzsymbols} 

begin{document}
begin{minipage}{3cm}
captionsetup{skip=0pt,minmargin=0cm, maxmargin=0cm,justification=centering}
{ begin{center}

includegraphics[width=2cm,angle=0,rotate=0]{"example-image-a"}


textcolor{red}{Name}
end{center}
}
end{minipage}%
end{document}

I think maybe: images rotated auto when height > width of image.

I added “rotate = 0, angle = 0” into code, but no effect.

Please help.

Thank in advance

One Answer

Provided you have access to the graphicx package (which is being loaded by tikzsymbols in your case), you can use the angle= key to specify the rotation angle of the graphic. No rotate= key exists:

begin{center}
includegraphics[angle=90, width=2cm]{"example-image-a"}
end{center}

Note that the keys are read from left to right, so the above code rotates the image by 90 degrees anticlockwise and then scales the image to have a width of 2cm. Compare the two images produced by

begin{center}
includegraphics[angle=90, width=2cm]{"example-image-a"}First
includegraphics[width=2cm, angle=90]{"example-image-a"}Second
end{center}

output

The second was reduced to a width of 2cm before being rotated (so that its height is now 2cm).

Answered by Pippip19 on April 13, 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