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

latexforti
  • 2,091
  • 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 Feb 19 '19 at 01: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 Feb 19 '19 at 05: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 Feb 19 '19 at 05:33
  • and: % textfont=it]{caption}\usepackage{caption} %\usepackage{adjustbox}\usepackage{bbding}\usepackage{subfigure}\usepackae{wrapfig,floatrow}\usepackage{pifont}\input{insbox} \pgfkeys{/pgf/declare function={mymap(\x)=int(mod(1+\x*\x,4));}}

    \usepackage{enumitem} %\usepackage{atbegshi}% %\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}} \usepackage{tabu} \usepackage{epstopdf}

    – latexforti Feb 19 '19 at 05:33
  • and: \usepackage{translator, tikz, array} % pgfcalendar loaded later with \usetikzlibrary{calendar,shapes.geometric} \usetikzlibrary{calc} \usepackage{ucs} \usepackage{background} \backgroundsetup{contents={}} \usetikzlibrary{matrix} \usepackage{datatool,xfp} \usepackage{filecontents} – latexforti Feb 19 '19 at 05: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: http://ctan.math.illinois.edu/macros/latex/required/graphics/grfguide.pdf – AndréC Feb 19 '19 at 05:37
  • 1
    Edit your question (by clicking on the edit button) instead of answering in the comments. – AndréC Feb 19 '19 at 05:39
  • I had the same problem, but then I opened my images using gimp (OS Ubuntu) and realized that my images were rotated. So they were not being rotated by Latex. – Espelin Dec 16 '20 at 23:20

1 Answers1

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

pip
  • 1,847
  • 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 Feb 19 '19 at 15:04
  • 1
    Remove the angle=90 or use angle=0 for no rotation. – pip Feb 19 '19 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 Feb 19 '19 at 15:27