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

Douglas McKenna doug at mathemaesthetics.com
Wed Dec 10 21:06:43 CET 2014


I'm automatically generating LaTeX code that needs to change the right margin of the page on a line group by line group basis.  And I'm not actually using \chapter at all (for now, but probably will once I understand how to customize it).  It's just that this
was the simplest example I could come up with that demonstrated the problem.  I figured if I could understand this little problem, I'd be able to understand my own.

- Doug McKenna



Lars Madsen wrote -

> Presumably because \chapter start by issuing \clearpage or \cleardoublepage
> 
> You really should not use adjustwidth around chapters etc.
> 
> What are you trying to achive?
> 
> /Lars Madsen
> Institut for Matematik / Department of Mathematics
> Aarhus Universitet / Aarhus University
> Mere info: 
> http://au.dk/daleif@imf / More information: http://au.dk/en/daleif@imf
> 
> 
> 
> ________________________________________
> From: texhax [
> texhax-bounces at tug.org
> ] on behalf of Douglas McKenna
> [
> doug at mathemaesthetics.com
> ]
> Sent: 06 December 2014 05:26
> To: 
> texhax at tug.org
> 
> Subject: [texhax] Why does adjustwidth in changepage package sometimes  create a
> blank page?
> 
> 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