5

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

8
  • 3
    TeX won't rotate them automatically... Just saying. What type of images are you including? Could you have them auto-rotated in some other package and it was saved rotated?
    – Werner
    Commented Feb 19, 2019 at 1:31
  • @Werner thanks. My image files type: jpg. Some images jpg rotated auto and others jpg not . Same coding, same width but different height
    – latexforti
    Commented Feb 19, 2019 at 5:30
  • My all package : \usepackage{amsmath,amssymb,scalerel} \usepackage{pgffor, ifthen} \usepackage{lmodern} \usepackage[most]{tcolorbox} \usepackage{graphicx} \usepackage{lipsum} \usepackage{ifthen} \usepackage[utf8]{english}\usepackage[english]{babel}\usepackage{MnSymbol,wasysym}\usepackage{tabularx,booktabs}\usepakage{tikzsymbols}\usepackage{ragged2e}\usetikzlibrary{backgrounds}\usetikzlibrry{decorations.text, arrows.meta,calc,shadows.blur,shadings}%\usepackage[format=plain, % abelfont={bf,it},
    – latexforti
    Commented Feb 19, 2019 at 5:33
  • 1
    angle=0 and rotate =0 are not options of \includegraphics. You will find the options applicable to this command in the graphicx package manual here: ctan.math.illinois.edu/macros/latex/required/graphics/…
    – AndréC
    Commented Feb 19, 2019 at 5:37
  • 1
    Edit your question (by clicking on the edit button) instead of answering in the comments.
    – AndréC
    Commented Feb 19, 2019 at 5:39

1 Answer 1

4

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).

3
  • Thank for your reply. In my case, i don't want unexpected Rotation when Height of image (2.5cm) > Width of image (2.cm). What should I edit?
    – latexforti
    Commented Feb 19, 2019 at 15:04
  • 1
    Remove the angle=90 or use angle=0 for no rotation.
    – pip
    Commented Feb 19, 2019 at 15:07
  • i changed angle but not unsuccess. But luckly when i save as file A.JPG (caption) to A.jpg then done. :). Thank so much.
    – latexforti
    Commented Feb 19, 2019 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .