1

I'm using scrbook class and configure floats by the floatrow package. In twoside documents it produces a left shift of 2pt for floats on odd pages.

How can align floats as on even pages?

Example:

\documentclass[a4paper, twoside, 10pt]{scrbook}
\usepackage{showframe}
\usepackage{floatrow,graphicx}

\floatsetup[figure]{  
margins=hangoutside,
capposition=beside,
capbesideposition={top,outside},
floatwidth=\textwidth,
capbesidewidth=\marginparwidth,
facing=yes,
objectset=centering
}


\begin{document}
\begin{figure}[h!]  
\includegraphics[draft]{file.pdf}
\caption{my shifted caption (left)}
\end{figure}
\newpage
\begin{figure}[h!]
\includegraphics[draft]{file.pdf}
\caption{my caption (right)}
\end{figure}
\end{document}
0

The distance separating the figure and its caption has to be set equal to \marginparsep. The default value being \columnsep

\documentclass[a4paper, twoside, 10pt]{scrbook}
\usepackage{showframe}
\usepackage{floatrow,graphicx}

\DeclareFloatSeparators{marginparsep}{\hskip\marginparsep} % <--------------

\floatsetup[figure]{  
margins=hangoutside,
capposition=beside,
capbesideposition={top,outside},
floatwidth=\textwidth,
capbesidewidth=\marginparwidth,
facing=yes,
objectset=centering,
capbesidesep = marginparsep  % <------------------
}


\begin{document}
\begin{figure}[h!]  
\includegraphics[draft]{file.pdf}
\caption{my shifted caption (left)}
\end{figure}
\newpage
\begin{figure}[h!]
\includegraphics[draft]{file.pdf}
\caption{my caption (right)}
\end{figure}
\end{document}

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.