# Chapter page numbers outside of margins memoir

When I send the file to createspace for their online reviewer, it tells me that a few page numbers are outside the margins, which happen to be the ones for each chapter when each chapter begins. Here is MWE:

\documentclass{memoir}
\usepackage[size=pocket,trim,bleed]{createspace}
\checkandfixthelayout
\begin{document}
\chapter{Chapter 1}
foo bar
\end{document}


I am using createspace (GitHub) package for this.

EDIT: Is there a way to just remove the numbers when each chapter begins?

-
Have you asked the author of createspace? Seems to be a bug there ... –  Kurt Apr 7 at 12:58
@Kurt I do not know how to get into contact with the author. Is there no other way this problem can be fixed? –  gekkostate Apr 7 at 14:05
Have a look into createspace.sty at the beginning. There should be an email adress. If not (I do not know/use github) there must be an owner of the github directory? I would change to package geometry. –  Kurt Apr 7 at 14:39
@Kurt I have found the e-mail of the owner and I have sent him a message regarding this but I don't know when the owner will respond. Is there any way you can help me with the geometry package? Because, the only reason I used the createspace package was because I did not know how to set up geometry and implement the gutter and the bleed. I am using 5.25" x 8" in createspace. –  gekkostate Apr 7 at 14:42
Sorry, I do not know the english words gutter and bleed. I suggest you ask better in the chat. –  Kurt Apr 7 at 14:49
show 1 more comment

You wrote in a comment to @Kurt that you used the createspace package only because you didn't get the desired results with the geometry package.

Based on the problems with createspace that you reported elsewhere (here and here), my advice is to eschew that package unless you absolutely have to use it; stick to more established packages like geometry as much as possible. The problem you're having with chapter numbers ending up outside the text area should then disappear.

The following code, which uses the geometry package and not the createspace package, should give you what you want; see my answer to your other question for a detailed calculation of the paper geometry.

\documentclass{memoir}
\usepackage[showframe]{geometry}

\geometry{
paperheight=8.06in,
%top=.5in,
%bottom=.5in,
paperwidth=5.185in,
%inner=.5in,
%outer=.5in,
bindingoffset=.3in,
}
\begin{document}
\chapter{My first chapter}
\chapter{My second chapter}
\end{document}


You still have to set the margins to your taste but note that, with the geometry package,

1. The vertical page geometry is set by three independent lengths out of four possible lengths: paperheight = top + textheight + bottom;

2. The horizontal page geometry is set by three independent lengths out of four possible lengths: paperwidth = inner + textwidth + outer.

3. The bindingoffset option increases the inner margin by the specified length, at the expense of textwidth; the gutter option seems to be createspace's equivalent to geometry's bindingoffset.

-
I updated the file and everything seems to look right. I'm going to upload soon to createspace and see what it's online reviewer thinks. However, now I get a whole host of underfull \vbox errors which I did not get before. What could be the issue? –  gekkostate Apr 7 at 21:34
This type of complaints from LaTeX depend on the contents of your input file. Difficult to tell without seeing it. That said, I wouldn't worry too much about underfull and overfull warnings, especially if the output document looks right to you. Feel free to accept my answer(s) if you're happy with them :) –  Jubobs Apr 7 at 21:37
Okay fantastic! I uploaded the file and it said that the file was smaller than 5.25" x 8" and it was actually 5.18" x 8". Should I change the paperheight and paperwidth accordingly? –  gekkostate Apr 7 at 21:59
Yes. You can also change the values of the margins (inner, outer, top, bottom) to your taste. –  Jubobs Apr 7 at 22:01
It seems that when I change the paperheight and the paperwidth to 5.25" x 8" respectively, the issue with chapter numbers is back. I increased the bottom but now everything is shifted. When I increase one thing, do I have to increase them all? –  gekkostate Apr 7 at 22:48
show 1 more comment