\appto
is not the way to go.
You might think you could do something like
\savegeometry{mysavedgeometry}
\usepackage{afterpage}
\newcommand{\mychapter}[1]{%
\newgeometry{margin=0.5in}%
\chapter{#1}%
\afterpage{\loadgeometry{mysavedgeometry}}}
But this won't work because the parameters are only getting set locally within \afterpage
.
But that's not the end of the story. You can go in and manually change the parameters in a global manner. It's a bit of a pain, but you can do it.
\documentclass{report}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\usepackage{afterpage}
\newcommand{\mychapter}[1]{%
\newgeometry{margin=2in}
\chapter{#1}
\afterpage{%
\global\setlength{\oddsidemargin}{0in}%
\global\setlength{\evensidemargin}{0in}%
\global\setlength{\hsize}{\dimexpr\paperwidth-2in\relax}
}}
\begin{document}
\lipsum[1-10]
\mychapter{test}
\lipsum[1-40]
\end{document}
The result isn't pretty. As noted in the comments above, you cannot change the effective width of a paragraph mid-paragraph. So when a paragraph spills over from the start of a chapter, on the following page it's not formatted correctly. As best I can tell there's no nice work-around for this.
What this means is that you'll have to go into the document and manually enter \pagebreak
before any paragraph that will spill over onto the following page where you're new page geometry is to take effect. I'm not sure this solution then really saves you any hassle. But maybe you'll feel that having to add \pagebreak
is far easier than manually resetting page dimensions.
But then you might have long paragraphs, half appearing on the first page of the chapter and half appearing on the next page. That's a bit more icky to deal with, and involves more manual mucking around in the document.
\documentclass{report}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum}
\usepackage{afterpage}
\newcommand{\mychapter}[1]{%
\newgeometry{margin=2in}
\chapter{#1}
\afterpage{%
\global\setlength{\oddsidemargin}{0in}%
\global\setlength{\evensidemargin}{0in}%
\global\setlength{\hsize}{\dimexpr\paperwidth-2in\relax}
}}
\begin{document}
\lipsum[1-10]
\mychapter{test}
\lipsum[1-2]
{Nulla malesuada porttitor diam. Donec felis erat, congue non, volut-
pat at, tincidunt tristique, libero. Vivamus viverra fermentum
felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper
elit. Proin fer- mentum massa ac quam. Sed diam turpis, molestie vitae,
placerat a, mo- lestie nec, leo. Maecenas lacinia. Nam ipsum ligula,
eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula
feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae
enim. Pellentesque tincidunt\parfillskip0pt\par}\pagebreak
\noindent puvel magna. Integer non enim. Praesent euismod nunc eu purus. Donec
bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec et
mi. Nam vulputate metus eu enim. Vestibulum pellentesque felis eu
massa.
\lipsum[4-40]
\end{document}
That seems like potentially a lot of mucking. And to boot, I had to put in a manual page break as it was.
A couple of other notes:
I'm not so sure that using etoolbox
to \preto
and \appto
are the way to go here. You're not really trying to change what a \chapter
does. You're trying to change the lay-out of the page on the first page of the chapter. So, I think building a wrapper around \chapter
by defining a wrapper function \mychapter
is probably a better way to go.
Second point, LaTeX automatically adds 1in
to the effective left-hand margin. If you try to set \oddsidemargin
to 1in
thinking you'll get a 1in
left margin, you'll be rather disappointed.
Finally, you might want to check out my musings about how to answer your question to get an idea of why changing \textwidth
or \linewidth
will not effect the change to the page geometry you want.
The problem is that with your current settings, a portion of the text area lies outside the physical page; this can be seen with the help of the showframe
package (it draws some visual guides); loading this package with your settings, one gets
and you can see that the text area is wrong. You need to adjust your settings; one possibility is to use the predefined stock and page sizes offered by the class (pages); for example, with mediumvopaper
and \pagemediumvo
\documentclass[9pt,extrafontsizes,oneside,mediumvopaper]{memoir}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\setlrmargins{0.75in}{*}{*}
\pagemediumvo
\chapterstyle{bringhurst}
\fixthelayout
\usepackage{lipsum}
\usepackage{showframe}
% Font and Typography Settings
\usepackage{concrete}
\usepackage{euler}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[babel=true]{microtype}
\makeatletter
\newlength\drop
\newcommand*{\titleGM}{%
\thispagestyle{empty}
\begingroup% Gentle Madness
\drop = 0.1\textheight
\vspace*{\baselineskip}
\vfill
\hbox{%
\hspace*{0.2\textwidth}%
\rule{1pt}{\dimexpr\textheight-28pt\relax}%
\hspace*{0.05\textwidth}%
\parbox[b]{0.75\textwidth}{%
\vbox{%
\vspace{\drop}
{\Huge\bfseries\raggedright\@title\par}\vskip2.37\baselineskip
{\Large\bfseries\@author\par}
\vspace{0.5\textheight}
}% end of vbox
}% end of parbox
}% end of hbox
\vfill
\null
\endgroup}
\makeatother
\title{The Title}
\author{The Author}
\begin{document}
\titleGM
\end{document}
The mediumvo options will give you 9in
x 5.75in
; if you want to have 9in
x 6in
, you could use the following settings:
\documentclass[9pt,extrafontsizes,oneside,mediumvopaper]{memoir}
\stockheight=9in
\stockwidth=6in
\paperheight=9in
\paperwidth=6in
\settrimmedsize{\stockheight}{\stockwidth}{*}
\setlrmargins{0.75in}{*}{*}
Best Answer
Here is a start (some work still left to do):
This uses the
background
package (which internally usuestikz
) to draw the required frame:A few variables can be tweaked as desired (all distances are in cm):
\FrameXStart
is horizontal distance from edge of page to outer edge of frame\FrameXEnd
is horizontal distance from edge of page to inner edge of frame\FrameYClip
is vertical distance from edge of page to top/bottom of the frame\FrameTextShift
is vertical distance of the text from the top edge of page\PageNumberLocation
is vertical distance from bottom of page to page numberNotes:
References:
Further Enhancements:
Code