I am trying to include a graphic which need to be rotated, along with the caption and fill the text to the textheight(in my example, this is set to 0.6 of textheight, for demonstration with the example image). This is inside a wrap figure, and I would like to align the wrapfigure to the right side(with the bottom of the captiontext aligned to the right). As of now, This works okey, but the width of the wrap figure is wrong. Changing the value will change the placement of the whole image and caption, but now I need to tweak it. There must be a better way of doing this. I have looked into the rotating-package, but it doesn't give me quite the result I'm after.

\usepackage{wrapfig,adjustbox, graphicx, lipsum}

      Image is huge} \end{minipage}},rotate=90,center}
\section{Section text}

An alternative would be to include a section in with the text rotated according to the image, but on top of it. The problem with this approach is that I also have some fancy headers with the \firstleftmark which then produces some wrong results.


The main problem is that adjustbox creates a square box using the larger dimension, which can be demonstrated using \fbox. This approach uses \rotatebox and \savebox instead.

\usepackage{wrapfig,adjustbox, graphicx, lipsum}
\usepackage{caption, showframe}




      \captionof{figure}{Image is huge}

\section{Section text}
\raisebox{0pt}[\dimexpr \ht\tempbox-\baselineskip]{\usebox\tempbox}

full page

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.