I want to use the sidecaption environment in a figure with memoir and have the caption text be ragged against the text block. But when the figure is moved to the next page, the caption is on the correct side but the raggedness is wrong. I have created the following
MWE according to the memoir manual but even with \strictpagecheck it does not work, no matter how many luatex runs I do:
\documentclass[a4paper,twoside,draft]{memoir}
\usepackage{fixltx2e}
\usepackage{calc}
\usepackage{luatextra}
\usepackage{lipsum}
\usepackage{ragged2e}
\marginparmargin{outer}
\setmpjustification{\RaggedLeft}{\RaggedRight}
% margin figure and caption typeset ragged against text block
\setfloatadjustment{marginfigure}{\mpjustification}
\setmarginfloatcaptionadjustment{figure}{\captionstyle{\mpjustification}}
\sidecapmargin{outer}
\setsidecappos{t}
\setsidecaps{\marginparsep}{\marginparwidth}
\setlength{\fboxsep}{0pt}
\begin{document}
\lipsum[1]
\begin{figure}[p]
\strictpagecheck
\begin{sidecaption}{This is an example text. It should be ragged on the page
border, not on the side of the figure.}
\fbox{\parbox[t][\textheight - 4pt][c]{\linewidth - 3pt}{test}}
\end{sidecaption}
\end{figure}
\lipsum
\end{document}