[Tex/LaTex] Custom Paper Size, Geometry Package Class

geometrymargins

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}

Best Answer

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}

cropped

EDIT

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

crop marks on US letter

\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}