# Custom Paper Size, Geometry Package Class

I'm trying to compile a document to a custom page size and then have crop marks printed. I can't even get to the crop package because there's a geometry package clash and I don't know why. Here's a MWE:

\documentclass[10pt,headsepline]{bookest}
\usepackage[paperheight=7in,paperwidth=4.25in,top=1in,bottom=1in,right=1in,left=1in]{geometry}
\usepackage[english]{babel}
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{LinLibertine_Re-4.7.5}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}

• Have you tried with the showcrop option of the geometry package? – GuM Jun 8 '16 at 0:23
• Option clash with package: geometry. – user26732 Jun 8 '16 at 0:25

The issue is that bookest.cls does

\RequirePackage{geometry}


before the package is loaded in the preamble. So there is an option class: it has been loaded with no options and later with some.

There are various ways around this.

1. Use

\geometry{<options>}


in the preamble, if the options are ones which can be set after the package is loaded. If not, choose method 2 or 3.

2. Use

\documentclass[<options>]{bookest}


which will probably produce some warnings about unrecognised options, which can be safely ignored. Alternatively, use method 3.

3. Use

 \PassOptionsToPackage{<options>}{geometry}
\documentclass{bookest}


to pass the options to the package when the class loads it.

# EDIT

Here's an example. Note that even with \tiny sized font, the text block is way too small for TeX to produce nice output. With a normal sized font, expect oodles of bad boxes.

Note that crop marks only make sense when the layoutsize is smaller than the papersize since there is otherwise nowhere for the marks to actually show. (I guess they still exist but not on the paper.)

\documentclass{bookest}% neither 10pt nor headsepline are doing anything whatsoever as far as I can tell - certainly the class doesn't recognise them
\geometry{%
paperheight=8in,
paperwidth=5.25in,
top=1in,
bottom=1in,
right=1in,
left=1in,
layoutsize={4.25in,7in},
layoutoffset={.5in,.5in},
showcrop,
}
\usepackage{blindtext}
\begin{document}
\tiny
\Blinddocument
\end{document}


# EDIT

Here's an example showing the crop marks on US letter paper, as requested in comments:

\documentclass{bookest}% neither 10pt nor headsepline are doing anything whatsoever as far as I can tell - certainly the class doesn't recognise them
\geometry{%
letterpaper,
top=1in,
bottom=1in,
right=1in,
left=1in,
layoutsize={4.25in,7in},
layoutoffset={1.5in,1.5in},
showcrop,
}
\usepackage{blindtext}
\begin{document}
\tiny
\Blinddocument
\end{document}

• I tried the third option since it seemed to be the easiest; but the compile threw a "Missing \begin{Document}" error. Ignoring that yielded a fall-back letter size page. I tried adding the line "\PassOptionsToPackage[paperheight=7in,paperwidth=4.25in,top=1in,bottom=.5,right=1in,left=1in]{geometry}" both before and after \documentclass{bookEST} (damn autocorrect) – user26732 Jun 8 '16 at 22:19
• That's because you used square brackets rather than curly ones to surround the list of options. – cfr Jun 8 '16 at 22:26
• Making that correction, the program compiled properly, but the page size (that is, the virtual page size) is now letter size instead of 4.25x7. The goal is to produce a proof so that I can see physically the layout. – user26732 Jun 8 '16 at 22:33
• Since 4.25x7 is smaller than letter paper, it should be possible to print a page with crop marks. – user26732 Jun 8 '16 at 22:35
• Please see edit @user26732. As you see, it certainly is possible to get crop marks on US letter paper with a 4.25x7 layout. All I did was say letterpaper instead of setting paperheight and paperwidth. Note that since the class loads geometry, it may well use it and you may well need to either set geometry options using class options (according to the documentation if it covers this) or to override it after the class is finished its geometry configuration. Since \geometry{} seems to work here, I'd suggest sticking with that. – cfr Jun 9 '16 at 0:50

It seems that the document class already loads the geometry package, and this is what causes the option clash. Simply use the \geometry command to specify the options you want to pass. For example:

\documentclass[10pt,headsepline]{bookest}
% \usepackage{geometry}
\usepackage{blindtext}

\geometry{
a4paper,
layoutheight=7in, layoutwidth=4.25in,
layoutvoffset=1in, layouthoffset=1in,
margin=0in, % am I correctly guessing your intention?
showcrop
}

\begin{document}

\Blinddocument

\end{document}

• This worked. My ultimate goal was to modify the bottom margin because it was too big. I thought that the geometry package would automatically calculate the text block area, but that doesn't seem to be the case. I'd like maybe a half inch at the bottom of the page with mirrored right left margins for printing. – user26732 Jun 8 '16 at 22:27