I have a problem with my LaTeX code:
I want two things:
- Besides "normal" figures with the figure in the middle and the caption below, I want some pictures be rotated (because of their size) to fit the page in landscape view and the caption still below the picture, thus also rotated.
- I also need some pictures on the left or right of the page and the caption on the side of them.
First, I was able to do 1. via rotatebox
. But to get my captions next to the figures, I added the package floatrow
, which seems to cause that the captions for case 1. are not rotated anymore.
Below you find the reduced code, including the floatrow
package. Can someone help me and explain, why floatrow
cancels the rotation of the caption and provide me with a work around?
\documentclass[12pt,a4paper]{scrbook}
\usepackage[latin1]{inputenc}
\usepackage{tgadventor}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{subfigure}
\usepackage[onehalfspacing]{setspace}
\usepackage{placeins}
\usepackage{caption}
\usepackage{floatflt}
\usepackage{wrapfig}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage{color}
\usepackage{multirow}
\usepackage{geometry}
\usepackage[nottoc]{tocbibind}
\usepackage{appendix}
\usepackage{color}
\usepackage{paralist}
%\usepackage{flafter}
\usepackage{ifthen}
\usepackage{mathptmx}
\usepackage{upgreek}
\usepackage{enumitem}
\usepackage{floatrow}
\begin{document}
\begin{figure}
\rotatebox{90}{%
\begin{minipage}{0.9\textheight}
\includegraphics[width=\linewidth]{picthatshouldberotated.pdf}
\caption[setupt]{text.}
\label{fig:setup}
\end{minipage}}
\end{figure}
\begin{figure}[h]
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=8cm}}]{figure}[\FBwidth]
{ \caption[thingy]{thingy}}
{\includegraphics[width=0.45\textwidth]{picwithcaptionnextoit.png}}
\label{fig:thingy}
\end{figure}
\end{document}