2

I am trying to insert an image, scaling it to the text size and rotating it, using the following example:

\documentclass{memoir}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=\textwidth,height=\textheight,keepaspectratio,angle=90]{bhuta1.JPG}
\end{figure}
\end{document}

The image is here. As can be seen below the image appears very small only, why is that so, and how do I fix it?

Output

1 Answer 1

3

Your image makes it look smaller than I expect. and smaller than I get with pdflatex, but you have the arguments the wrong way round, they are read left to right so you need

enter image description here

\documentclass{memoir}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=\textheight,height=\textwidth,keepaspectratio,angle=90]{bhuta1.JPG}
\end{figure}
\end{document}

with the width based on text height as you scale before rotating.

4
  • I use xelatex, and it seems the problem is connected with that, as with pdflatex and your suggested change (which I had actually already tried out with xelatex, without it solving the problem) the result is fine.
    – muk.li
    Commented May 20, 2015 at 10:17
  • 1
    @muk.li there have been a few issues with image inclusion in xetex but I just tried it with the xelatex in texlive 2015 pretest and it is identical to the pdflatex result. the problem was determining the initial size from the jpeg data, so it probably works to remove the width= and height= and just put scale=5 or whatever value works Commented May 20, 2015 at 10:21
  • Using the scale option to includegraphics doesn't help. I converted the jpeg to png, that seemed to work, I hope without losses to the image quality, I'll have to look a bit into that. Or else I could maybe just use pdflatex for that file.
    – muk.li
    Commented May 20, 2015 at 10:50
  • I think the more intuitive solution is to make the angle=90 the first argument and base the height on the textheight.
    – matth
    Commented Nov 7, 2016 at 12:09

You must log in to answer this question.

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