Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Consider the following simple example:

% === this is simple.tex ===
\documentclass[paper=a5,pagesize]{scrbook}
\usepackage{lipsum}
\begin{document}
\lipsum{1-10}
\end{document}

When processing this source file with pdflatex, the output file has the correct page size of the DIN A5 format. Now for some reasons I want to introduce my own document class:

% === this is myclass.cls ===
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myclass}[2014/07/01 1.0 current]
\LoadClass[paper=a5,pagesize]{scrbook}

% === this is withclass.tex ===
\documentclass{myclass}
\usepackage{lipsum}
\begin{document}
\lipsum{1-10}
\end{document}

As you can see, I am passing exactly the same options. In this case, the output file is created using the system default page size, in my case DIN A4. I suspect that somehow the parameters do not get propagated from \LoadClass in the same way - is this correct and what can I do about it?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

I found a solution in one of the related posts: I need to pass the options to the package typearea explicitly.

% === this is myclass.cls ===
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myclass}[2014/07/01 1.0 current]
\PassOptionsToPackage{paper=a5,pagesize}{typearea}
\LoadClass[paper=a5,pagesize]{scrbook}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.