[texhax] Why does adjustwidth in changepage package sometimes create a blank page?

Douglas McKenna doug at mathemaesthetics.com
Sat Dec 6 05:26:20 CET 2014


All -

I need to change the right margin back and forth depending on the type of text in individual lines on the page.  So I've been using the changepage package and the adjustwidth command/environment, which seems to do the job.

Except ...

Here is a Minimum Working Example (pdfTeX, TeXLive 2014), that does what I'd expect for a onside book document.  If you run this MWE, you get two pages, each with a Chapter title on it.  So far so good.

-------------------------------
%%!TEX TS-program = pdflatex
\documentclass[oneside]{book}
\usepackage{changepage}

\begin{document}

%\begin{adjustwidth}{0in}{0in}
\chapter{HERE WE GO}
Blah
\chapter{HERE WE GO AGAIN}
Blah
%\end{adjustwidth}

\end{document}
-------------------------------

Now, uncomment the two lines that invoke adjustwidth. Run again and the result is now THREE pages, with a blank page inserted in front of the first chapter page, and with a line number 1 peculiarly in the upper right corner, even though on the next two pages it's centered in the footer.

And if you swap the two lines so that the \begin{adjustwidth} is AFTER the \chapter{HERE WE GO} line, the initial blank page 1 goes away.

I don't want this extra blank page, but I don't understand what is causing it so I don't know what the right solution is.  Seems like a bug to me, because adjusting page margin width should be orthogonal to any typesetting or creating new pages.

Any elucidation, ideas, or advices?

TIA,

Doug McKenna




More information about the texhax mailing list