1

When I use memoir and decrease the margin widths across a page break with the adjustwidth environment, the page number is pushed sideways. What's going on?

page number too far to the right

\documentclass{memoir}
\newlength{\extrawidth}
\setlength{\extrawidth}{50mm}

\newlength{\textwidthwide}
\setlength{\textwidthwide}{\textwidth}
\addtolength{\textwidthwide}{\extrawidth}

\newenvironment{widetext}
{\begin{adjustwidth}{-.5\extrawidth}{-.5\extrawidth}%
\setlength{\textwidth}{\textwidthwide}}%
{\end{adjustwidth}}

\usepackage{blindtext}

\begin{document}
\Blindtext\Blindtext
\begin{widetext}
  \Blindtext\Blindtext
\end{widetext}
\end{document}
Jostein Trondal
  • 1,165
  • 9
  • 20

1 Answers1

3

you have reset \textwidth that has re-arranged the header. the intention of adjustwidth is to locally change the margins without changing the page setup. so just remove

\setlength{\textwidth}{\textwidthwide}
David Carlisle
  • 757,742
  • Aha! In that case, then this probably has the same problem?: https://tex.stackexchange.com/questions/16582/center-figure-that-is-wider-than-textwidth/154766#154766 – Jostein Trondal Apr 24 '17 at 18:40
  • @cmhughes uses it inside the table environment, so it wouldn't be a problem there... – Jostein Trondal Apr 24 '17 at 18:42
  • 1
    @JosteinTrondal that's inside a table environment so doesn't affect the header (in fact it does nothing at all in the code as posted there) – David Carlisle Apr 24 '17 at 18:48