Document ClassesTroubleshooting: Can't use "letterpaper" option on scrbook

Information and discussion about specific document classes and how to create your own document classes.
fliptomato
Posts: 12
Joined: Tue Jun 24, 2008 3:19 am

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by fliptomato »

Hello everyone, I've been using the hepthesis class (http://www.ctan.org/tex-archive/help/Ca ... hesis.html) to typeset a document, but have found that my attempt to feed it the "letterpaper" option has been met with the error

Code: Select all

LaTeX Warning: Unused global option(s):
    [letterpaper].
This is the line that I use in my thesis.cls file:

Code: Select all

\LoadClass[hyperpdf,nobind,sftitles,twoside,nobooktabs,letterpaper]{hepthesis}
It seems that the scrbook class isn't accepting my "letterpaper" option. The output is always in A4 paper size.

Any help would be greatly appreciated!

Best,
Flip

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by Stefan Kottwitz »

Hi Flip,
fliptomato wrote: Hello everyone, I've been using the hepthesis class (http://www.ctan.org/tex-archive/help/Ca ... hesis.html) to typeset a document
Are you sure that you're using the current versions of both hepthesis and scrbook? hepthesis.cls supports letterpaper. Here's code of that class v1.4.2:

Code: Select all

\DeclareOption{letterpaper}{%
  \def\@useAFour{}%
  \PassOptionsToClass{letterpaper}{scrbook}%
}
Stefan
LaTeX.org admin
fliptomato
Posts: 12
Joined: Tue Jun 24, 2008 3:19 am

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by fliptomato »

Hi Stefan, I checked with the latest version of hepthesis and I'm still getting some strange behavior.

If I compile this document:

Code: Select all

\documentclass[]{hepthesis}

\title{An example}
\author{Exmple McExampleson}

\begin{document}

\begin{mainmatter}
\chapter{Example} 
Test chapter.
\end{mainmatter}

\end{document}
I get an A4 sized page. On the other hand, if I put in the "letterpaper" option,

Code: Select all

\documentclass[letterpaper]{hepthesis}

\title{An example}
\author{Exmple McExampleson}

\begin{document}

\begin{mainmatter}
\chapter{Example} 
Test chapter.
\end{mainmatter}

\end{document}
I indeed get a letter-paper sized document, but it appears to just chop off the bottom part of each page! (The page numbers disappear.)

Is there a way to check my version of scrbook?

Thanks,
F
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by Stefan Kottwitz »

fliptomato wrote: Is there a way to check my version of scrbook?
You could look into the generated .log file for a line like

Code: Select all

Document Class: scrbook 2008/11/14 v3.01 KOMA-Script document class (book)
Stefan
LaTeX.org admin
fliptomato
Posts: 12
Joined: Tue Jun 24, 2008 3:19 am

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by fliptomato »

Hi Stefan -- thanks for the replies. I've updated my versions of hepthesis and scrbook, below is the relevant part of the log file:

Code: Select all

(./hepthesis.cls
Document Class: hepthesis 2008/05/23 HEP thesis class by Andy Buckley (v1.4.2)
(/usr/local/texlive/2008/texmf-dist/tex/latex/koma-script/scrbook.cls
Document Class: scrbook 2009/01/24 v3.02b KOMA-Script document class (book)
(/usr/local/texlive/2008/texmf-dist/tex/latex/koma-script/scrkbase.sty
Package: scrkbase 2009/01/24 v3.02b KOMA-Script package (KOMA-Script-dependent 
basics and keyval usage)
Unfortunately I'm still only producing A4 documents.

Here's my tex file:

Code: Select all

\documentclass[letterpage]{hepthesis}

\title{An example}
\author{Test}

\begin{document}

\begin{mainmatter}
\chapter{Example} 
Test Chapter
\end{mainmatter}

\end{document}
Here's the warning:

Code: Select all

LaTeX Warning: Unused global option(s):
    [letterpage].
Thanks!
F
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by Stefan Kottwitz »

fliptomato wrote: Here's my tex file:

Code: Select all

\documentclass[letterpage]{hepthesis}
Here you have to use letterpaper instead of letterpage.

Stefan
LaTeX.org admin
fliptomato
Posts: 12
Joined: Tue Jun 24, 2008 3:19 am

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by fliptomato »

Stefan_K wrote: Here you have to use letterpaper instead of letterpage.

Stefan
Ah! Indeed you are correct, thanks! However, I'm still only producing A4 documents rather than US letter-sized documents.

I tried poking around hepthesis.cls, and found that if I remove the "yes" on line 34:

Code: Select all

\def\@useAFour{yes}
so that it looks like

Code: Select all

\def\@useAFour{}
I end up with US letter sized documents, but with the bottom part chopped off. (I.e. forcing the A4 page onto a US letter page.) Is there a way to check how scrbook wants the "letterpaper" option passed to it?

Sorry for all this trouble and I appreciate all the help. I've been banging my head against this all day.

Thanks,
F
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by Stefan Kottwitz »

Perhaps it's a problem with the pdf paper handling. Have a look at Paper sizes with pdfTeX or try:

Code: Select all

\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}
Stefan
LaTeX.org admin
fliptomato
Posts: 12
Joined: Tue Jun 24, 2008 3:19 am

Re: Troubleshooting: Can't use "letterpaper" option on scrbook

Post by fliptomato »

Unfortunately the setlength commands didn't help... I'm still getting A4 documents.

-F
fliptomato
Posts: 12
Joined: Tue Jun 24, 2008 3:19 am

Troubleshooting: Can't use "letterpaper" option on scrbook

Post by fliptomato »

It appears that there's a problem with hepthesis.cls in which the "letterpaper" option isn't being passed correctly to scrbook. If I replace the "hepthesis" document class in my example file with

Code: Select all

\documentclass[letterpaper]{scrbook}
then the resulting document works perfectly fine, I end up with a US letter-sized document. (Without the added formatting that hepthesis.cls provides, of course.)

It seems like the problem has to do with passing the "letterpaper" option to scrbook within hepthesis.cls. This option is passed via the command

Code: Select all

\PassOptionsToClass{letterpaper}{scrbook}
.

If I try bypassing all of the other options in hepthesis.cls and insert the command

Code: Select all

\PassOptionsToClass{letterpaper}{scrbook}
\LoadClass[12pt,chapterprefix]{scrbook}
then I get the warning

Code: Select all

LaTeX Warning: Unused global option(s):
    [letterpaper].
which leads me to believe that this option isn't being passed propertly to scrbook within the hepthesis.cls file.

The KOMA-script guide (http://www.ctan.org/tex-archive/macros/ ... rguien.pdf) says that paper format options are not processed by the KOMA-script document classes directly (page 48)... so I wonder if there is something fishy going on here?

Thanks,
F
Post Reply