# \sidebar doesn't respect geometry's bottom margin

MWE:

\documentclass{memoir}

\usepackage{geometry, lipsum}

\begin{document}
\newgeometry{top=2cm, bottom=2cm, inner=1cm, outer=0.618\textwidth}

\sidebar{\lipsum}
\lipsum
\end{document}


The text in the margins only goes to where memoir had formerly placed the margins (you can verify this by commenting the \newgeometry line). I know that geometry and memoir together is not necessarily the best idea, but I really want the easy per-page geometry that geometry offers.

How do I get \sidebar to use geometry's margins? (or how do I change per-page margins with memoir?)

• @ChristianHupfer The problem is that the sidebar doesn't respect geometry's bottom margin. – Simon Kuang Aug 6 '15 at 22:23

The height of the \sidebar is set to \textheight when the class is loaded. And, of course, a change in the geometry is accompanied with a change in \textheigth that doesn't transfer to the \sidebar. You can correct for this by resetting the \sidebar height to \textheight:

\documentclass{memoir}

\usepackage{geometry, lipsum}

\begin{document}
\newgeometry{top=2cm, bottom=2cm, inner=1cm, outer=0.618\textwidth}
\setsidebarheight{\textheight}
\sidebar{\lipsum}
\lipsum
\end{document}

• Which is why using the build in memoir interface for the layout might be a better idea. – daleif Aug 11 '15 at 11:41