situation
I'm using the memoir
class, two-sided. I left place for margin notes. Thus the text block is not at the center of my "sheet of paper" and this non-central position is different for odd and even pages. (On the verso page the margin notes are situated on the left, on the recto page they are on the right side of the page.)
goal All my figures have a standard width equal to a length that I called \widthw = \textwidth + \marginparsep + \marginparwidth
(I found the definition of these lengths on pages 10 and 11 of this pdf). Now I want to adjust the position of these figures like illustrated in following screenshots:
- verso (left page):
- recto (right page):
my trial
\newlength{\rf}
\newcommand*\definesHSpace
{
\checkoddpage
\ifoddpage
\setlength{\rf}{0mm}
\else
\setlength{\rf}{\marginparsep+\marginparwidth}
\fi
}
\newenvironment{myfigure}
{
\begin{figure}[h]
\definesHSpace
\hspace{-\rf}
\begin{minipage}[h]{\widthw}
}
{
\end{minipage}
\end{figure}
}
%begin document...
\begin{myfigure}
...
\end{myfigure}
problem The "IF" works not like desired. I'll try to explain why I think it fails:
Let say we are on a odd page. I finished a paragraph of text and, on the page, there is still place for e.g. 3 lines of text. Now I write \begin{my figure} ...
Well, the answer to the "IF" is "odd page", although LaTeX will put the figure on the next page (because the image is higher than the height of the 3 lines of text). So the figure will not be adjusted like I would have expected.
solution? It would be fantastic if someone had an idea to solve this problem. (I know tufte-book
has some full-width figure environment, but I do not want to use that class.) Thanks a lot!!!